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...
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 previous message
mirek is currently offline  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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: EditString in toolbar doesn't work
Next Topic: How to disable focusing menu using TAB key
Goto Forum:
  


Current Time: Sun May 05 15:47:23 CEST 2024

Total time taken to generate the page: 0.02764 seconds