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 » Menus&Toolbars » Popup menu with check items
Re: Popup menu with check items [message #39267 is a reply to message #39245] Thu, 07 March 2013 08:49 Go to previous messageGo to previous message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

Sorry for the bad place and thanks for moving.

Seeing that my code was not working, I just had a try changing the "Menu" in the reference samples. Here are the changed parts :
void MainBar(Bar& bar)
{
	bar.Add("Menu", THISBACK(Menu));
	bar.Add("Enable numbers", THISBACK(EnableNumbers)).Check(numbers_enabled); // *** Added ***
}

void RightDown(Point p, dword keyflags)		 // *** Added ***
{						 // *** Added ***
	menu.PopUp();				 // *** Added ***
}						 // *** Added ***

MenuBar menu;
	typedef App CLASSNAME;

App()
{
	numbers_enabled = false;
	//AddFrame(menu);			 // *** Commented ***
	menu.Set(THISBACK(MainBar));
}


This way, I have no more menu bar, and a popup with the EnableNumbers option both in the menu and in the submenu. It is working well in the submenu, but not in the menu...

Am I doing something wrong ?

BTW, I'm trying this under Ubuntu, Theide/Upp version 5858.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ToolBar Callback weirdness
Next Topic: [Minor bug & fix] Wrong color of MenuBar item when mouse cursor is on it (Gtk backend)
Goto Forum:
  


Current Time: Sun Apr 28 23:33:09 CEST 2024

Total time taken to generate the page: 0.04694 seconds