Главная страница | назад





Article #16770: Avoiding flicker on DrawCell

 Question and Answer Database
FAQ1770D.txt Avoiding flicker on DrawCell
Category :VCL
Platform :All
Product :All 32 bit
Question:
When I set the font color on a DrawGrid's DrawCell event using
Font.Color := clRed; I get an endless loop of flicker. How can I get
around this?
Answer:
Be sure to fully qualify the canvas that you are using.
Example:
If (Row = 0) then begin
DrawGrid1.Canvas.Font.Color := clRed;
DrawGrid1.Canvas.TextOut(Rect.Left,Rect.Top, IntToStr(Col));
end;
7/16/98 4:31:28 PM

Last Modified: 01-SEP-99