Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Look and Chameleon Technology » coloring menu background
coloring menu background [message #18592] Fri, 10 October 2008 18:15 Go to next message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

hello

i want to change the color of the menu i want to change it's back ground and text color

thx in advance
Re: coloring menu background [message #18603 is a reply to message #18592] Sat, 11 October 2008 08:31 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14162
Registered: November 2005
Ultimate Member
MenuBar::Style::look

Mirek
Re: coloring menu background [message #18612 is a reply to message #18603] Sat, 11 October 2008 23:40 Go to previous messageGo to next message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

thx luzr

i did this but color didn't change
static MenuBar::Style menu_style = MenuBar::StyleDefault();
menu_style.look = Color(191,227,3);
Menu.SetStyle(menu_style);
Re: coloring menu background [message #18619 is a reply to message #18612] Sun, 12 October 2008 13:19 Go to previous message
bytefield is currently offline  bytefield
Messages: 210
Registered: December 2007
Experienced Member
Hi, you should give more info about which platform you use and which Upp version. Here, on Linux with latest svn it work and the color of menu bar is changed(kind of green). If you want to change also the "menu" color you have to write something like:
menu_style.popupbody = Color(191,227,3);

See all members of MenuBar::Style and try to play with they to see how they behave.
P.S.: i think Menu is an instance of MenuBar, no?
Add your code in constructor of example 7 from Manual and report if it work or not. I think there should be no problems with that. (Don't forgot to use lower-case if you put your code in example 7 Menu->menu) Smile

Modify colors from my code to see which part of menu is changed.
	MyAppWindow() {
		Title("My application with menu").Sizeable();
		static MenuBar::Style menu_style = MenuBar::StyleDefault();
		menu_style.look = Color(191,227,3);
		menu_style.popupbody = Color(191,227,3);
		menu_style.topitem[2] = Color(191,2,3);
		menu_style.topitem[1] = Color(10,200,3);
		menu_style.topitem[0] = Color(100,255,33);
		menu_style.item = Color(25,100,25);
		menu.SetStyle(menu_style);
		AddFrame(menu);
		menu.Set(THISBACK(MainMenu));

	}


cdabbd745f1234c2751ee1f932d1dd75
Previous Topic: changing button image make program crash
Next Topic: How to zoom all fonts?
Goto Forum:
  


Current Time: Sat Dec 14 14:26:13 CET 2024

Total time taken to generate the page: 0.03712 seconds