Board index » delphi » TstringGrid : Draw Cell problem

TstringGrid : Draw Cell problem

Using Delphi 4 StringGrid I have a problem when focus leaves the string grid
Im in and I have entered a value in a column I am in .   I have an
OnDrawCell event which is suppossed to format the column as right justified
but it doesnt justify it when focus leaves the grid. (To another
stringgrid).  During normal up/down navigation through the grid the right
justification works fine on any row for the column.  Any suggestions as to
what I should do here?.  I have tried setting the editormode  property to
false in the Onexit event which seems to format it but leaves an unusual
background colour in the cell and causes focusing problems when I come back
into the grid.

Any suggestions would be greatly appreciated.

 

Re:TstringGrid : Draw Cell problem


In message <83c957$i...@forums.borland.com>, Mark Rydzynski stated:
Quote
> I have tried setting the editormode  property to
> false in the Onexit event which seems to format it but leaves an unusual
> background colour in the cell and causes focusing problems when I come back
> into the grid.

> Any suggestions would be greatly appreciated.

Use the State argument of the DrawCell handler to determine if you are
selected or not and draw appropriately.

===
Regards
Ralph (TeamB)
===

Other Threads