[Gtk-sharp-list] Disabling UIManager Actions
LiamDyalog
liam at dyalog.com
Mon Oct 7 14:12:49 UTC 2013
I know this is stale but for anyone coming across this now there is actually
a way to get the UIManager.GetAction() function to retrieve the action
you're looking for. You need to give it the path of a "proxy widget"
connected to the action that you're trying to access.
For example, imagine you have a simple MenuBar:
- MenuBar
- HelpMenu
- About
The xml might look like:
<ui>
<menubar name='MenuBar'>
<menu action='HelpMenu'>
<menuitem action='About'/>
</menu>
</menubar>
</ui>
The path you need to pass to the GetAction function:
var action = uiManager.GetAction("/MenuBar/HelpMenu/About"); // The leading
forward slash is important
At which point you could set the sensitivity from the variable you have etc.
--
View this message in context: http://mono.1490590.n4.nabble.com/Gtk-sharp-list-Disabling-UIManager-Actions-tp1544168p4661053.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
More information about the Gtk-sharp-list
mailing list