Hugo Bendtner 0 Posted December 21, 2021 I am exploring usage of the TTitleBarPanel in Delphi 10.4 and am struggling with the styling of the system buttons (which never take on the custom color of the TTitleBarPanel) and attempting to use Custom Buttons (TCaptionButtonItem) these never seem to display, although clicking in their location calls their attached events). Have I got the basics wrong, or is the TTitleBarPanel lacking? Share this post Link to post
Lajos Juhász 293 Posted December 21, 2021 Did you set the required properties for CustomTitleBar? For example: CustomTitleBar.Control = TitleBarPanel1 CustomTitleBar.Enabled = True CustomTitleBar.SystemColors = False CustomTitleBar.SystemButtons = False CustomTitleBar.BackgroundColor = clRed CustomTitleBar.ForegroundColor = 65793 CustomTitleBar.InactiveBackgroundColor = clWhite CustomTitleBar.InactiveForegroundColor = 10066329 CustomTitleBar.ButtonForegroundColor = 65793 CustomTitleBar.ButtonBackgroundColor = clRed CustomTitleBar.ButtonHoverForegroundColor = 65793 CustomTitleBar.ButtonHoverBackgroundColor = 16053492 CustomTitleBar.ButtonPressedForegroundColor = 65793 CustomTitleBar.ButtonPressedBackgroundColor = 15395562 CustomTitleBar.ButtonInactiveForegroundColor = 10066329 CustomTitleBar.ButtonInactiveBackgroundColor = clWhite Share this post Link to post
Hugo Bendtner 0 Posted December 21, 2021 Yes, I believe so, see below (with System Buttons ON/True, which seem to always take Windows colors): When System Buttons is Off/False no buttons display, even though you can see 4 in Design Time. I'm currently using these colors just to be obvious with what is going on (I wouldn't seriously be using them in my final application!). Share this post Link to post
Lajos Juhász 293 Posted December 21, 2021 This is on Delphi 10.4.2. CustomTitleBar.zip 1 Share this post Link to post
Hugo Bendtner 0 Posted December 22, 2021 Thanks very much, yes in my naivety setting everything to the same color caused the problem. ButtonForegroundColor is what controls the color of the icon inside the button. Again, thanks very much, common sense prevails! Share this post Link to post
Lajos Juhász 293 Posted December 22, 2021 For me it was also hard to set it up correctly for the first time. Unfortunately even in Delphi 11 it has some drawing issues RSP-36291. Share this post Link to post