Board index » cppbuilder » TStringGrid's OnDrawCell fires always

TStringGrid's OnDrawCell fires always


2004-02-28 09:09:46 PM
cppbuilder60
Using BCB5 I am writing an application with a stringgrid. When setting an
OnDrawCell event handler, this handler is called continously, independent of
the DefaultDrawing setting (both true and false).
How can I have that the handler is called only when a cell has changed its
content?
Please help
Bernhard
 
 

Re:TStringGrid's OnDrawCell fires always

"Bernhard Hoyler" < XXXX@XXXXX.COM >wrote in message
Quote
When setting an OnDrawCell event handler, this handler is
called continously, independent of the DefaultDrawing setting
(both true and false).
As well it should be. It is triggered whenever a cell needs re-drawing
onscreen, which can happen very often.
Quote
How can I have that the handler is called only when a cell
has changed its content?
That is not what the OnDrawCell event is for. The event must re-draw the
cell, regardless of whether the content changed, every time the cell needs
redrawing onscreen.
Gambit