Board index » delphi » Avoiding flicker in border regions while resizing controls drawn with DrawEdge

Avoiding flicker in border regions while resizing controls drawn with DrawEdge

Hi,

The VCL in D6 has introduced border properties for most controls. A dive into the sources reveal that the border property has been implemented using the DrawEdge API. So far so good.

Trouble begins when I put a couple of components component like  TListBox and seperate them using a TSplitter set ResizeStyle to rsUpdate and during runtime, moving the splitter causes bad flickers. If the border property of the associated components are set to none, the flicker is gone.

Same thing happens when the form is resized and sometimes the scrollbars in components with fancy border style set fail to draw themselves properly.

Any sloutions?

Thanks in advance.

P.S. I've tried to put controls on a TPanel with FullRepaint se to False, but no avail.

 

Re:Avoiding flicker in border regions while resizing controls drawn with DrawEdge


I've got the same problem in Delphi 5. When I use a TSplitter with rsUpdate,
everything (esp. borders) flicker. I also tried the same thing as Tanzim,
but no luck.

-Geir

Quote
"Tanzim" <tanz...@yahoo.com> wrote in message news:3bc0da0e$1_1@dnews...

> Hi,

> The VCL in D6 has introduced border properties for most controls. A dive

into the sources reveal that the border property has been implemented using
the DrawEdge API. So far so good.
Quote

> Trouble begins when I put a couple of components component like  TListBox

and seperate them using a TSplitter set ResizeStyle to rsUpdate and during
runtime, moving the splitter causes bad flickers. If the border property of
the associated components are set to none, the flicker is gone.
Quote

> Same thing happens when the form is resized and sometimes the scrollbars

in components with fancy border style set fail to draw themselves properly.
Quote

> Any sloutions?

> Thanks in advance.

> P.S. I've tried to put controls on a TPanel with FullRepaint se to False,

but no avail.

Re:Avoiding flicker in border regions while resizing controls drawn with DrawEdge


Hi,

"Geir Asle Aasen" <g...@vizrt.com> wrote in message
news:3bc18da1_1@dnews...

Quote
> I've got the same problem in Delphi 5. When I use a TSplitter with
rsUpdate,
> everything (esp. borders) flicker. I also tried the same thing as
Tanzim,
> but no luck.

TWinControl descendents have a DoubleBuffered property.  This usually
helps, but it will slow down painting, especially when used on a number
of controls.  For TGraphicControl descendents you have to set the
DoubleBuffered property of the parent.

Damien

Other Threads