luebbe 26 Posted September 22, 2020 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
Vincent Parrett 750 Posted September 22, 2020 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
Vincent Parrett 750 Posted September 22, 2020 BTW, I did try to use it, but it's buggy and doesn't work with TMainMenu.. so useless. Share this post Link to post
luebbe 26 Posted September 22, 2020 Thanks @Vincent Parrett. You are confirming my observations. So I won't invest any more time into this control. Share this post Link to post
pyscripter 689 Posted September 22, 2020 (edited) 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 September 22, 2020 by pyscripter 2 Share this post Link to post
luebbe 26 Posted September 23, 2020 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
BruceTTTT 7 Posted December 18, 2020 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
Zoë Peterson 15 Posted March 19, 2021 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