Home » U++ Library support » Menus&Toolbars » menu items in bar stays for a while...
menu items in bar stays for a while... [message #3555] |
Thu, 01 June 2006 15:53 |
qwerty
Messages: 130 Registered: May 2006
|
Experienced Member |
|
|
...nothing happening a few second and then it start to work. without exiting the program, another actions on menubar, which was delayed first time is now ok. It doesnt matter, which item in menubar I click, everything is delayed and onlly the first time per program run.
whay is that??
|
|
|
|
Re: menu items in bar stays for a while... [message #3662 is a reply to message #3555] |
Mon, 12 June 2006 10:28 |
qwerty
Messages: 130 Registered: May 2006
|
Experienced Member |
|
|
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.
[Updated on: Mon, 12 June 2006 10:51] Report message to a moderator
|
|
|
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: Fri Apr 26 00:38:24 CEST 2024
Total time taken to generate the page: 2.15428 seconds
|