FillRect
doesn\'t paint the complete TStringGrid
cell in Delphi XE2. There is a gap of 3 pixels on the left side in the default color (with B
You can use the StringGrid1.CellRect(ACol, ARow)
that returns the actual TRect of the cell instead of using the parameter Rect
.
Turn off the first 4 options in TStringGrid
:
Then it won't paint the grid lines, and your grid cells will paint right to the edges. Just tried it with XE.
This is expected behaviour in XE2 when DefaultDrawing = true
and themes are enabled (I'm not going to argue about good or bad here - as you might have noticed, the behaviour is different for RigthToLeft mode...).
A workaround is to check for this condition and decrement Rect.Left
by 4 pixel before calling FillRect
.
Since you're drawing the grid cell yourself then just turn off the grid property DefaultDrawing, set it to false.