3 Replies Latest reply on Aug 1, 2007 8:52 AM by danielvlopes

    I HATE Menubar ... some one can help???

    danielvlopes
      Hello, i'm alone inside this project ( http://br24.dialhost.com.br/~areaproj) and want to use flex... but having troubles with idiot menu.... In my case user que can change viewstacks when he click in Item of menu and in subitem to. For this a must make menubar show submenus when user rollover mouse... Some one know how to do this?

      Thanks.
        • 1. Re: I HATE Menubar ... some one can help???
          Bob Saggot Level 1
          create a menubar, link it to a xml list (for the drop downs)

          then on event "rollOver" have it expand the menu.

          <mx:MenuBar id="myMenuBar" useHandCursor="true" buttonMode="true" toolTip="The Main Menu" labelField="@label" width="322" cornerRadius="10" alpha="1" left="171" top="48" styleName="TopMenu" themeColor="#333333" selectionColor="0x7FCEFF" rollOverColor="0xFFFFFF" borderColor="#642200" itemClick="mainMenu(event)">

          <mx:XMLList>
          <menuitem label="Products" id="products" top="48" >
          <menuitem label="French Bread" data="1"/>
          <menuitem label="Croissants" data="2"/>
          <menuitem label="Muffins" data="3"/>
          <menuitem label="Rustic Bread" data="4"/>
          <menuitem label="Desserts" data="5"/>
          <menuitem label="Pretzels" data="6"/>
          </menuitem>
          <menuitem label="Customers" >
          <menuitem label="Login" data="7"/>
          <menuitem label="Steps to Become Potential Customer" data="8"/>
          </menuitem>
          <menuitem label="Company Resources" >
          <menuitem label="History" font-color="#FFFFFF" data="9"/>
          <menuitem label="Employment" data="10"/>
          <menuitem label="Employees" data="11"/>
          <menuitem label="Newsletter" data="12"/>
          <menuitem label="About Us" data="13"/>
          </menuitem>
          </mx:XMLList>


          </mx:MenuBar>
          • 2. Re: I HATE Menubar ... some one can help???
            danielvlopes Level 1
            Hum.... in your example i'm still having problems because user must click first on menu to set focus in menu and submenu show. In my case i need the rollover works because i will call function in Click event of menubar because some items don't had submenu and in case of this items (not had submenu) the item can change viewstack to, and in cases item had submenu submenu item will change viewstack.

            If user must click for activate a rollover the click event will be trigged before show a submenu.

            I'm really sad for this but if i can't fix this problem de project will no be made in flex anymore.
            • 3. Re: I HATE Menubar ... some one can help???
              danielvlopes Level 1
              Now i'm trying to dispatch menushow event when user rollover mouse....but didn't work, but i'm think is right way.

              <mx:MenuBar id="myMenuBar" labelField="@label" width="322" cornerRadius="10" alpha="1" left="64" top="48" styleName="TopMenu" themeColor="#333333" selectionColor="0x7FCEFF" rollOverColor="0xFFFFFF" borderColor="#642200" rollOver="this.dispatchEvent(new MenuEvent(MenuEvent.MENU_SHOW, true, false))" itemClick="mainMenu(event)">


              All this because i want a simple navigate between viewstack when user click in categorie and subcategorie.