trichview.com

trichview.support




Re: onPaint Ficker


Return to index


Author

Message

Sergey Tkachenko

Posted: 04/28/2003 12:48:57


Yes, this method is not double buffered. There are some reasons for it (the

same reasons prevent implementation of Prepaint=True mode).

Will be fixed in one of next updates, but not very soon.



> I am using the following code to draw a dark square after the MaxTextWidth

> area to show that the area is not editable.  It works great except the

> square flickers a some while the user scrolls and flickers alot while the

> user selects text.  It seems the onPaint method is not double buffered.

How

> can the flicker be avoided?

>

> TIA,

> Stephen Davenport

>

> procedure Tform1.rvePaint(Sender: TCustomRichView;

>   Canvas: TCanvas; Prepaint: Boolean);

> var r: TRect;

> begin

>   Canvas.Pen.Style := psSolid;

>   Canvas.Pen.Color := cl3DDKShadow;

>   Canvas.Brush.Style := bsSolid;

>   Canvas.Brush.Color := clBtnShadow;

>   r := Rect(Sender.MaxTextWidth+Sender.RightMargin, 0, Sender.Width,

> Sender.Height);

>   // drawing

>   Canvas.Rectangle(r);

> end;

>

>

>

>





Powered by ABC Amber Outlook Express Converter