More on Aero-glass and Delphi forms#

Since I just mentioned the Glow Label component for Delphi, I thought I mention a small problem with the glass effect and components placed on areas, where this effect is applied.

The (usually) black parts of the component are not painted correctly, when leaving all settings on default. You have to set the property DoubleBuffered to True, for correct painting of the components. Therefore, I have created a small routine which just does that. Simply pass along the form as parameter, an it will iterate through all controls and set their DoubleBuffer property to True.

procedure DoubleBufferAll(WinControl: TWinControl);
var
  I: Integer;
begin
  if not (WinControl is TBaseVirtualTree) then
    WinControl.DoubleBuffered := True;
  for I := 0 to WinControl.ControlCount - 1 do
    if WinControl.Controls[I] is TWinControl then
      DoubleBufferAll(WinControl.Controls[I] as TWinControl);
end;

Friday, October 12, 2007 1:04:03 PM (W. Europe Standard Time, UTC+01:00) #    Comments [1]  | 

 

Google AdSense


Saturday, October 13, 2007 5:13:57 PM (W. Europe Standard Time, UTC+01:00)
given the importance of double buffering, and how you should disable it when clients run your app over remote desktop, i've always been amazed that this property isn't published or automatically inherited from the form.

you'd think that double buffering would be enabled by default.
byron
Comments are closed.
All content © 2008, Daniel Wischnewski
On this page
Archives
Promoted Links
Blogroll OPML
My current Flickr Images
www.flickr.com
Dies ist ein Flickr Modul mit �ffentlichen Fotos und Videos von dwischnewski. Ihr eigenes Modul k�nnen Sie hier erstellen.
Recommendations
Sitemap
Special Pages
Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Theme design by Jelle Druyts