3 Replies Latest reply on Feb 17, 2011 11:54 PM by Flex harUI

    Menu visibility problem in flex

    Nedumangad Chandra Level 1

      Hi,

        I have created a menu in actionscript using mx.controls.Menu.It has 3 levels.Parent->Child1->Child2. But Child1 is not being shown in the screen. I have mentioned my code below.Please suggest a solution for this.

      [CODE]

      private var menuXMLStr:String = "<root><menuitem label=\"Parent\"><menuitem label=\"Child1\" toggled=\"false\"><menuitem label=\"Child2\"></menuitem></menuitem></menuitem></root>";

      private var menuXML:XML = new XML(menuXMLStr);

      private function createAndShow():void {

                      var myMenu:Menu = Menu.createMenu(null, menuXML, false);

                      myMenu.labelField="@label";

                      myMenu.show(10, 10);

                  }

      [/CODE]

        Here I need Child2 under child1.But Child1 is not being shown...!!!