Recent

Author Topic: TStringGrid moves selected cell to left, I can't get back  (Read 5868 times)

tlacuache

  • New Member
  • *
  • Posts: 14
    • http://grovers.us/seth
TStringGrid moves selected cell to left, I can't get back
« on: September 08, 2006, 05:24:50 pm »
I've run into something weird with a TStringGrid, so I thought I'd see if anybody had come across this before. I've got two columns. Initially when the program runs, it looks like this:

(http://grovers.us/seth/media/before.png)

When running, when I click on a cell in the second column to edit its text, the selected cell becomes the left-most cell, like this.

(http://grovers.us/seth/media/after.png)

After that, I can never get back to where I can see both columns. I have scroll bars turned to always be visible, but I still can't scroll left after I get in this state.

The properties which might be applicable of my TStringGrid are:

Align: alLeft
AutoFillColumns: true
AutoAdvance: aaNone
Columns: 2 items
FixedCols: 0
FixedRows: 1
Options:
  true: goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goColSizing, goEditing, goRowSelect, goAlwaysShowEditor, goSmoothScroll, goScrollKeepVisible
  false : everything else
ScrollBars: ssBoth
VisibleColCount: 2

Any ideas? Thanks!

Seth Grover
sethdgrover@gmail.com
http://grovers.us/seth

matthijs

  • Hero Member
  • *****
  • Posts: 537
RE: TStringGrid moves selected cell to left, I can
« Reply #1 on: September 08, 2006, 06:10:41 pm »
I think you have to use a trick to circumvent this behaviour. Make the width of your string just a few pixel bigger then the sum of the width of the columns and the border of your stringgrid.
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

 

TinyPortal © 2005-2018