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 #39269 is a reply to message #39268] Thu, 07 March 2013 09:24 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct MyApp : TopWindow {
	typedef MyApp CLASSNAME;

	bool check;

	void Check() { check = !check; }

	void RightDown(Point p, dword) {
		MenuBar bar;
		bar.Add("Check", THISBACK(Check)).Check(check);
		bar.Execute();
	}
	
	MyApp() {
		check = false;
	}
};

GUI_APP_MAIN
{
	MyApp().Run();
}
 
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: Mon May 13 21:12:24 CEST 2024

Total time taken to generate the page: 0.02791 seconds