| Check type menuitems [message #731352] |
Fri, 30 September 2011 13:32  |
Missing name Missing name Messages: 18 Registered: September 2011 |
Junior Member |
|
|
I've added a command that toggles a two state view preference in my app. I created a HandledMenuItem for this command and set the type to Check. I also added this to a menu and added a Handler for the command and a keybinding.
The menuitem shows up in the menu with a checkbox and the state of the check is remembered correctly. Also, my handler is called when I activate the menuitem or via the keybinding. So far so good.
Here's the problem: I need to know what the state of the check is both in my handler and in my view code that consumes this preference. But I can't figure out how to access the check state either in the handler or elsewhere.
What's the correct way to get at this info?
|
|
|
|
|
|
| Re: Check type menuitems [message #909072 is a reply to message #736595] |
Thu, 06 September 2012 09:42  |
Marco Descher Messages: 37 Registered: October 2010 Location: Austria |
Member |
|
|
I got that one working to synchronize from the HandledMenuItem to the Code! But how could I initialize the state of the HandledMenuItem at start given the Preference?
Or more generally, how can I set the state of a HandledMenuItem given by the state of the code at all?
Thanks!
[Updated on: Thu, 06 September 2012 10:02] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01724 seconds