Home » U++ Library support » Menus&Toolbars » menu items in bar stays for a while...
Re: menu items in bar stays for a while... [message #3663 is a reply to message #3662] |
Mon, 12 June 2006 10:53 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
qwerty wrote on Mon, 12 June 2006 04:28 | only the 'menu' related items:
.cpp file, constructor:
...
AddFrame(menu);
menu.Set(THISBACK(Menu));
...
.h file, inside the only class:
...
private:
MenuBar menu;
void Menu(Bar& menu) {
menu.Add("File", THISBACK(File));
}
void File(Bar& menu) {
menu.Add("New", THISBACK(New));
menu.MenuSeparator();
menu.Add("Load", THISBACK1(Load, "nic")); // "nic" - just a dummy thing
menu.Add("Save", THISBACK(Save));
menu.MenuSeparator();
menu.Add("Load scheme", THISBACK1(LoadSch, false));
menu.Add("Save scheme", THISBACK(SaveSch));
menu.MenuSeparator();
menu.Add("Exit", THISBACK(Close)); // Close() - original "API" function
}
// definition of these is in .cpp file
void Reset();
void New();
public:
void Load(String file); // public because of calling before .Run() in main
void LoadSch(bool start);
private:
void Save();
void SaveSch();
...
upp examples works.
|
Seems OK to me. Must be something else. Compilable testcase!
Mirek
|
|
|
Goto Forum:
Current Time: Sun May 05 15:47:23 CEST 2024
Total time taken to generate the page: 0.02764 seconds
|