Is it possible to catch some event after OnDrawCell? I would like to draw texts on a cells

114 views Asked by At

Stripes

I would like to draw nice texts on a stripes after all drawing on TStringGrid is done. Problem is I don't know when I can draw them. Is there any envent that occurs after OnDrawCell, when whole grid is drown?

1

There are 1 answers

0
Germán Estévez -Neftalí- On

The OnDrawCell event is fired on the TCustomDrawGrid.DrawCell procedure (VCL.Grids.pas). This method is protected, defined in TCustomDrawGrid class:

procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); override;

You can override this method in your own class derived from TStringGrid and write whatever code you need after calling inherited.