Jump to content
luebbe

TTitlebarpanel and VCL styles

Recommended Posts

Does anyone have experience with the combination of this component with VCL styles?

My first tests aren't very promising. It looks like I have to set every color of the component manually when a VCL style is applied.

Share this post


Link to post

TTitlebarpanel is the most arse backwards design in Delphi - and that's saying something since there are many to chose from!

 

TForm has a bunch of properties, that are only relevant when you have a specific control placed on it and hooked up… yet you manage the control from properties on the form not on the control?  Having most of the options on the form rather than the panel is odd to say the least, since you tend to interact with the panel, and it’s painful switching between the two due to the object inspector not remembering where you were on the controls, so lots of scrolling, expanding… etc. Also in a real application, the form is quite often covered with panels etc and so have to use the structure view to even select the form.

 

Yet another half baked barely functioning feature added to the vcl  - which btw can't be removed (because someone "might" be using it), destined to be hacked at to try and fix it (but never really succeeding), just like vcl themes. 

Share this post


Link to post

The TitleBarPanel is used by the IDE.   I guess it was developed to resolve the problem with the disappearing/flickering controls of the IDE title bar (search, layout controls, etc.),    It can accommodate Toolbars (including the ActionMainMenuBar) and other controls, so you can place the main menu on the titleBar (see the sample app).   And to answer the original question, you would need to manually adjust the Titlebar colors every time there is a style change.  This is probably how the IDE styles its TitleBarPanel.   

 

@Vincent Parrett I also do not like the overcrowding of TForm and other controls with rarely used properties.  (e.g. CustomHint that can be linked to a Balloon Hint all but abandoned - not DPI aware).

Edited by pyscripter
  • Like 2

Share this post


Link to post
17 hours ago, pyscripter said:

And to answer the original question, you would need to manually adjust the Titlebar colors every time there is a style change.  This is probably how the IDE styles its TitleBarPanel.  

The joke is: There is a "SystemColors" checkbox, but obviously Emba decided not to call StyleServices.GetSystemColor(), so I had to turn it of and tried to adjust the titlebar colors manually.

This works, sort of, but the windows border color is not the style's border color anymore. So this has to be set manually as well...

Share this post


Link to post

My experience is similar too. Does not work with TMainMenu, and it has painting issues (e.g. add a TSpeedButton to the TTitleBarPanel and toggle the Flat property). The ShowCaption property doesn't seem to work either.

Share this post


Link to post
On 9/23/2020 at 3:34 AM, luebbe said:

The joke is: There is a "SystemColors" checkbox, but obviously Emba decided not to call StyleServices.GetSystemColor(), so I had to turn it of and tried to adjust the titlebar colors manually.

This works, sort of, but the windows border color is not the style's border color anymore. So this has to be set manually as well...

Is there a way to set the form's border color when using TTitleBarPanel if you're not using seBorder in the StyleElements?  For our usage this would be workable short term, if I can tone down the bright white window frame

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×