1 Reply Latest reply on Apr 1, 2008 6:03 AM by cd12

    How to disable/invisible submenubar item in Script ?

    hazelwang
      I want to create a dynamic menubar (disable/invisible submenu item) in Script , My menubar is like the following:

      <mx:XML id="myMenuData">
      <xmlRoot>
      <menuitem label="MenuItem A" >
      <menuitem label="SubMenuItem A-1"/>
      <menuitem label="SubMenuItem A-2"/>
      </menuitem>
      <menuitem label="MenuItem B"/>
      </xmlRoot>
      </mx:XML>
      <mx:MenuBar labelField="@label" itemClick="menuHandler(event);" id="myMenu" dataProvider="{myMenuData}" />

      How to set SubMenuItem A-1 invisble/disable in Script?