A root gui question

Hi,
I use root/gui for an application. When I add a TGPopupMenu in a TGMenuBar, I found there is no way to get the TGMenuTitile TList, so I could not set its background or font.
Like the picture in attachment. the background of “File”, “Edit”… could not be changed.
Is there anyone who know how to solve this problem? Thankyou!

Hi,

Before to process your request please clarify the following - what about the menu bar background color: from aesthetical point of view the menu bar + menu titles background colors should be the same.

Thank you, Ilka

Hi,
First, I changed Gui.backgroundColor to the very light blue, as in the popup menu.
Second, I changed background color of the menubar (which contains the ‘File’, ‘Edit’) to a deeper blue.
However, I could not change the background color of the menu title, as you see in the ‘File’, ‘Edit’ blocks.
When TGMenuTitle called DoRedraw(), it always gets the default FrameGC from TGResourcePool, so I think maybe it’s impossible to change background of TGMenuTitle.

Thank you.

Hi,

OK, I see you have changed the default background color setting in the .rootrc file. In addition, you want to have a different background for the menu bar and menu titles. It is not possible with the current implementation of the menu widgets, but we could include this possibility. Do you want to keep the different background color for the added popup menus? It seems normal if they ‘adopt’ the menu bar background color in this case, isn’t it ?

Cheers, Ilka

Hi,
Yes, I hope to change the background of MenuTitle, the popup menu could keep the same color as MenuTitle by default.
Further suggestion is to make it possible to change the background of every Menu entry, althought the popup usually keeps the same color as menu title. If we have more choices, more beautiful faces could be made, isn’t it?
Thank you very much.

Hi,

The design of GUI classes includes the freedom of the application color choices by settings given in .rootrc file. The GUI rules advise up to 5, max 7 colors per application because having more makes users tired. Your request is included in our ToDo list and will be process after some tasks with higher priority.

Cheers, Ilka