TPageControl Tabs on Bottom in MSWindows lazarus / 31-LCL ---------------------------------------------------------------------- Avishai · 2013-05-05 05:07 On MSWindows TPageControl draws the Tabs differently depending on TabPosition if Themes are active.  Only tpTop, tpLeft and tpRight are useable.  tpBottom looks disconnected. tpLeft and tpRight draws them WindowsClassic and tpTop draws them according to Themes. But I found code that will turn Themes off only for TPageControl making them consistent for all positions as WindowsClassic.  Some may not like the look, but if you need the tabs on the bottom or just prefer the Classic look, this seems to work very well.  I only found it a few minutes ago so it's NOT well tested. Code: [Select]uses UxTheme; UxTheme.SetWindowTheme(PageControl1.Handle, NIL, ''); It 'might' be a good idea to introduce a new property for TPageControl to turn Themes off only for that control (MSWindows only). Personally, I prefer the Classic look anyway. ---------------------------------------------------------------------- exdatis · 2013-05-05 07:12 Very useful, thank you! Regards ---------------------------------------------------------------------- Avishai · 2013-05-06 18:15 If you use MSWindows, this might be useful for those that prefer the Windows Classic look for TPageControl, or if you need the Tabs at the bottom. Code: [Select]uses UxTheme; procedure FixPageControl(ACtrl: TObject);  // Turns Themes off for TPageControl begin   {$IfDef Windows}   if ACtrl is TPageControl then begin     UxTheme.SetWindowTheme(TPageControl(ACtrl).Handle, NIL, '');   end;   {$EndIf} end; ---------------------------------------------------------------------- Avishai · 2013-05-09 12:11 This is a screenshot of TPageControl showing Themes ON and Themes OFF. ---------------------------------------------------------------------- Avishai · 2013-05-13 10:32 I think I have figured out a way to fix TPageControl for MSWindows but I don’t have the skills to write it.  The first problem is that when it first shows, the color of the Active TabSheet is white until you change the active Tab at run-time and then go back to the previous Tab.  The second problem is that when it is Themed, it looks horrible. I did some experiments and found that I could create a TCustomControl at run-time to cover the TabSheet.  That solved the Color issue.  The TCustomControl Cover could be added to the TTabSheet Create with  ControlStyle:= ControlStyle - [csNoDesignSelectable]. The horrible appearance is much easier.  This code turns off Themes for the TPageControl: Code: [Select]uses UxTheme; UxTheme.SetWindowTheme(PageControl1.Handle, NIL, ''); I think Property Color should be published for TTabSheet and a Property Themed could be added to TPageControl. If anyone wants to give this a try, I would appreciate it and I expect a lot of others would as well.