The dataDescriptor has an isToggled method that is passed the data item
and returns true or false.  By default, it looks for a toggled="true"

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Sascha
Sent: Friday, March 30, 2007 11:48 PM
To: [email protected]
Subject: [flexcoders] Toggling Menu Item?



Hi list,

Since I cannot find any information about this anywhere else ...

How do you toggle a (flex 2 ) check/radio menu item from ActionScript?
Say I use an XML object to populate my MenuBar with ...

private var _menuXML:XMLList =

                <>

                                <menuitem label="Foo">

                                                <menuitem label="Bar"
type="check" data="bar"/>

                                </menuitem>

                </>;

var _menubar:MenuBar = new MenuBar();

_menubar.dataProvider = _menuXML;

... how are you able to toggle the check item on/off with ActionScript?
I don't see any way to reach the specific item via MenuBar properties.

Thanks in advance for any tips!

Sascha

 

Reply via email to