[Lazarus] PageControl color

Paul Ishenin ip at kmiac.ru
Wed Sep 17 02:28:10 CEST 2008

Benito van der Zander wrote:
> Hi,
> if you enable theming in Windows XP the background color of a 
> TPageControl changes from gray (clBtnFace)
> to white (is this clWhite or a system color?).
> The problem is now, that a TTrackBar or a TStringGrid always draw there 
> background as clBtnFace, which
> looks quite stranges on a white background.
> So how do you set the correct color?
> if ThemeServices.ThemesEnabled then TrackBar1.Color:=clWhite;
> seems to work on xp, but assumes of curse that the themed color is 
> always white.

TTrackBar is a windows common control. We need to correct win32 
widgetset code to let it draw transparently on parent controls if themes 
are enabled. Feel free to create a patch which solves this problem.

TStringGrid is a control which LCL draws itself. We need to use more 
themes painting to make it look more native. This can be done later.

And, btw, color is not clWhite - theme services are using bitmaps to 
draw control surfaces. If you change theme to another it can look as 
Blue or Black or as any other color.

Best regards,
Paul Ishenin.

More information about the Lazarus mailing list