Link to home
Start Free TrialLog in
Avatar of fadyg
fadyg

asked on

Extending vertical lines on a DBGrid

Hello everyone,

I would like to have my DBGrid to have extended vertical gridlines until the bottom of the grid.

If you have for example only two records in a table, the column cells will be drawn only for those two records.  But it would be nicer to be able to extend the column delimiters vertically until the bottom of the grid.

Any ideas ?
Avatar of Cesario Lababidi
Cesario Lababidi
Flag of Germany image

Do you have the source code of Unit DBGrids ?
Avatar of fadyg
fadyg

ASKER

Yes, but I would not like to modify these sources but rather subclass DBGrid.  That way I can still beneficiate from any new feature in the next Delphi release..
Two ways : 1. Add empty records or paint your lines ( simulate the empty records ) on procedure WMPAINT(var Message: TWMPaint); Message WM_Paint;
Avatar of fadyg

ASKER

I would go for the simulation of lines and not add records.  Do you have any piece of code that ?
ASKER CERTIFIED SOLUTION
Avatar of ginsonic
ginsonic
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fadyg

ASKER

The flicker part is really a good idea ;)
Drawing the lines will be just a matter of some canvas extra work (Moveto & Lineto) at the boundary of each column

thx
Fady
My pleasure,
Nick