0 Replies Latest reply on Sep 1, 2006 1:47 AM by sobaka11

    Menu bug?

    sobaka11
      I have three-level menu.Bug: cursor is over one of second-level list's elements and third-level list is appeared, then I move cursor to one of first-level elements(but not parent element for second-level list) ---> the whole menu disappears. In this situation only first-level list must be shown, but the whole menu disappears. I think it's menu-component bug. Are there any ways to fix it?

      Code:

      <mx:Script>
      <![CDATA[
      // Import the Menu control.
      import mx.controls.Menu;
      // Create and display the Menu control.
      private function createAndShow():void {
      // The third parameter sets the showRoot property to false.
      // You must set this property in the createMenu method, not later.
      var myMenu:Menu = Menu.createMenu(null, myMenuData, false);
      myMenu.labelField="@label";
      myMenu.show(10, 10);
      }
      ]]>
      </mx:Script>

      <!-- Define the menu data. -->
      <mx:XML format="e4x" id="myMenuData">
      <root>
      <menuitem label="MenuItem A" >
      <menuitem label="SubMenuItem A-1" enabled="False"/>
      <menuitem label="SubMenuItem A-2">
      <menuitem label="SubMenuItem A-2-1"/>
      <menuitem label="SubMenuItem A-2-2"/>
      </menuitem>
      </menuitem>
      <menuitem label="MenuItem B" type="check" toggled="true"/>
      <menuitem label="MenuItem C" type="check" toggled="false"/>
      <menuitem type="separator"/>
      <menuitem label="MenuItem D" >
      <menuitem label="SubMenuItem D-1" type="radio" groupName="one"/>
      <menuitem label="SubMenuItem D-2" type="radio" groupName="one"
      toggled="true"/>
      <menuitem label="SubMenuItem D-3" type="radio" groupName="one"/>
      </menuitem>
      </root>
      </mx:XML>
      <mx:VBox >
      <!-- Define a Button control to open the menu -->
      <mx:Button id="myButton" label="Open Menu" click="createAndShow()"/>
      </mx:VBox>