Jump to content
GP_23

How to change color of Title Bar without TTitleBar

Recommended Posts

I'm looking for a (hopefully simple) way of changing the color of the title bar without using the custom title bar stuff because I am using a TMainMenu and everything gets screwed up.

 

I watched Ray Konopka's really good video from 2021 on how to do it but it was way more elaborate than I care to implement.

 

Anyone done this?


Thanks

Edited by GP_23

Share this post


Link to post
  • I couldn't see anything in those articles that solved the problem.  Which doesn't mean it is not there, I am not a super advanced programmer even though I been have pecking away at it for years.
  • I am working with VCL
  • I found this article on the Microsoft site which seemed hopeful until I read that it is only for Windows 11 which is too restrictive at this time

Share this post


Link to post

I am not sure which version of Delphi you are using, @GP_23 (You can set that in your profile),

but the following has been working at least since Sydney: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Custom_Title_Bar_for_VCL_Forms

 

Edit: ... and I fell into the trap of not reading the OP properly.  Surely there must be a way to get the main menu and custom title bar working?

Share this post


Link to post

One would think so, but I am thinking less and less that that is the case.  Like I said Ray K tackled it on a video but he abandoned TMainMenu and constructed a menu in a different way.  I don't want to go through all that just to change the color of the title bar.  Maybe it can be done by creating a customized style but I haven't looked into that and there other pressing things that I should dive into first.

 

Confession, I am actually a C++Builder user (just migrated to 11.3).  But because the vast majority of Rad Studio users are Delphi people, I posted on the Delphi forum to reach a larger crowd as I can always translate the code (if it is mostly UI stuff that is).

Share this post


Link to post

Okay well it turns out it is easy.  The trick is you have to use TActionMainMenu instead of TMainMenu which is what Ray K was using.  I gave up too soon on his video because he was trying to do some fancier stuff as well.

 

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

×