0 Replies Latest reply on Apr 10, 2010 9:58 AM by alcaponis

    Problems with menuitem "toggled"

    alcaponis

      I cant find out why I cannot add an atribute to menuitem like toggled="true"...

      Maybe someone has any idea?

      Here is my code: (thats not all, but you should understand what I want to do)

       

       

      [Bindable]

                  public var menuBarCollection2:XMLListCollection;

       

       

       

      private var menubarXML2:XMLList =<>

                      <menuitem label="Vartotojų tipas">

                          <menuitem label="Mokinys" data="mokinysData"type="check"/>

                          <menuitem label="Moderatorius" data="moderatoriusData" type="check"/>

                          <menuitem label="Administratorius" data="administratoriusData"type="check"/>

                          <menuitem label="Auklėtoja" data="aukletojaData"type="check"/>

                      </menuitem>

                      <menuitem label="Veiksmai">

                          <menuitem label="Trinti" data="trintiData"/>

                          <menuitem label="Perkelti į kitą klasę" data="perkeltiData"/>

                      </menuitem>

                      </>

       

       

       

      // Event handler to initialize the MenuBar control.

                  private function initCollections():void {

                      menuBarCollection2 = new XMLListCollection(menubarXML2);

                  }

      ...

      ...

      ....

       

      <mx:MenuBar labelField="@label" 

              dataProvider="{menuBarCollection2}"

              itemClick="itemClickHandler2(event);"/>

       

      Tell me what am I doing wrong?