The menudatadescriptor has methods isToggled/get/setToggled, IIRC.
Usually that maps to "toggled" properties or attributes in the
dataprovider you sent to the MenuBar.

 

Manipulating the data in the dataprovider is the recommended way of
changing the state of the buttons.  It is not recommended that you do it
from the Menu instances as they can be created and destroyed
dynamically.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Anderson
Sent: Monday, October 29, 2007 1:15 PM
To: [email protected]
Subject: [flexcoders] Controlling MenuBar Submenus via Code frustrations

 

Greetings All,

I've burned an entire DAY searching the web for examples of how to
control sub-menus in a MenuBar control, via code. The main types of
things I need to accomplish, is toggling Checkboxes and Radio Buttons,
when certain application variables change.

My MenuBar has 6 primary menus across the top, and each primary menu,
could have any number of additional sub-menus (which have several
variations of menu types - Checkboxes, Radio Buttons, etc.)

My MenuBar is being populated via an external XML File.

Per the docs, each top level menu is considered a 'MenuBarItem', but
there is very little helpful information after that. All the help docs
focus primarily on listening for MenuBar events and writing functions to
respond - but there is NOTHING on how to do the reverse.

I consider myself to be a fairly seasoned Flex Programmer, but this
MenuBar stuff has got me stumped, and quite frustrated.

If anybody has any examples on this topic, I would be VERY grateful.

Thanks in advance for any help,

Mike

 

Reply via email to