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   |
 |
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.
|
|
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 09:42:04 CEST 2025
Total time taken to generate the page: 0.01226 seconds
|