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 » menu items in bar stays for a while...
menu items in bar stays for a while... [message #3555] Thu, 01 June 2006 15:53 Go to next message
qwerty is currently offline  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 #3561 is a reply to message #3555] Thu, 01 June 2006 19:04 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
qwerty wrote on Thu, 01 June 2006 09:53

...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??


Hard to say Smile What about posting a compilable test case?!

Mirek
Re: menu items in bar stays for a while... [message #3662 is a reply to message #3555] Mon, 12 June 2006 10:28 Go to previous messageGo to next message
qwerty is currently offline  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 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
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
Re: menu items in bar stays for a while... [message #3665 is a reply to message #3555] Mon, 12 June 2006 11:32 Go to previous message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
yes yes... I'll try Smile, thank you Wink
Previous Topic: EditString in toolbar doesn't work
Next Topic: How to disable focusing menu using TAB key
Goto Forum:
  


Current Time: Sun Nov 17 10:53:52 CET 2019

Total time taken to generate the page: 0.01417 seconds