Board index » delphi » Getting rid of highlighted cell in tstringgrid

Getting rid of highlighted cell in tstringgrid

This is a simple question, but I can't find the property anywhere.

I'm using a tStringGrid for displaying purposes only, so I'd like to get rid
of the highlighted cell indicating the current selected cell. I've tried
disabling the grid, but one of the cells keeps having a blue colour.

regards

Jimmy

 

Re:Getting rid of highlighted cell in tstringgrid


In article <3becf8ca$0$4859$ba624...@nntp02.dk.telia.net>, "Jimmy Rasmussen"

Quote
<Jim...@get2net.dk> writes:
>I'm using a tStringGrid for displaying purposes only, so I'd like to get rid
>of the highlighted cell indicating the current selected cell. I've tried
>disabling the grid, but one of the cells keeps having a blue colour.

Set the Selection property to select a cell outside the displayed cells of the
stringgrid. Note that Selection is a TGridRect, and you can conveniently make
one by using the Rect() function  to make a TRect and type-casting it ...

StringGrid1.Selection := TGridRect(Rect(-1, -1, -1, -1));

Alan Lloyd
alangll...@aol.com

Other Threads