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 » Disable/Enable Menu item during runtime
Disable/Enable Menu item during runtime [message #23456] Wed, 21 October 2009 01:58 Go to previous message
sdiscool is currently offline  sdiscool
Messages: 2
Registered: October 2008
Junior Member
I know we have a function called Enable. However, I have trouble how to access into it after reading tutorial (i am new to Ultimate ++).

Here is what I have (partial - i use separate CPP/H files):

this->AddFrame(menu);
menu.Set(THISBACK(MainMenu));

void MainMenu(Bar& bar) {
bar.Add("File", THISBACK(SubFileMenu))
.Help("File Menu");
bar.Add("Section", THISBACK(SubSectionMenu))
.Help("Section Menu").Enable(false);
}

void SubFileMenu(Bar& bar) {
bar.Add("Open", THISBACK(File_Open))
.Help("Open Menu");
bar.Add("Close", THISBACK(File_Close))
.Help("Close Menu");
bar.Add("Exit", THISBACK(File_Exit))
.Help("Exit Menu");
}

void File_Open() {
// I want to make "Section" enabled. How can I do it here?
// example: when user opens file, i want section to be enabled.
}

 
Read Message
Read Message
Previous Topic: ToolBar enabling and disabling question
Next Topic: Bigger images/icons in menu
Goto Forum:
  


Current Time: Sat Sep 21 00:42:59 CEST 2024

Total time taken to generate the page: 0.03389 seconds