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 » menus using different classes
menus using different classes [message #53735] Sat, 25 April 2020 22:07 Go to next message
mtdew3q is currently offline  mtdew3q
Messages: 181
Registered: July 2010
Location: Upstate, NY (near Canada)
Experienced Member

Hi all-

In the SqlApp examples on Ultimate site,
SqlApp is always in the same scope. I have a class MyMain, Class2, Class3 etc.
How can I get the MyMain::SubMenu to call a menu located in a different class, so I can use different class functions? I put a menu on the main form and on the layout for the different class. Thanks! roboloki

void MyMain::SubMenu(Bar& bar) {
bar.Add("Subsidiary", [=] { showciti();});
bar.Add("Purch. Journal", [=] { showpj();});
bar.Add("Exit", [=] { Exit(); });
}
void MyMain::MainMenu(Bar& bar) {
bar.Sub("Menu", [=](Bar& bar) { SubMenu(bar); });
}
Re: menus using different classes SOLVED [message #53736 is a reply to message #53735] Sat, 25 April 2020 22:38 Go to previous message
mtdew3q is currently offline  mtdew3q
Messages: 181
Registered: July 2010
Location: Upstate, NY (near Canada)
Experienced Member

HI all-

Never mind. I figured it out. It is very cool. Thnx! roboloki
Previous Topic: possibly toolbar button problem
Next Topic: menu's small box when i18n
Goto Forum:
  


Current Time: Sat Apr 20 05:33:48 CEST 2024

Total time taken to generate the page: 0.04716 seconds