4 Replies Latest reply on Sep 14, 2009 7:21 AM by markuspedro

    MenuBar -submenu color

    markuspedro Level 1

      Hi I've some problem with setting style of menubar.

      I've two question:

      • I can change the color of menubar, but may I change the background color of submenu ?( I see them still white).
      • May I change the orientation of submenu? (for example from vertical to horizzontal and vice versa).

       

      Thank you

      Marco

        • 1. Re: MenuBar -submenu color
          babo_ya Level 3

          Here is how to change the menubar item background color ..

           

           

          <?xml version="1.0" encoding="utf-8"?>

          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"

                  layout="vertical"

                  verticalAlign="left"

                  backgroundColor="white"

          >

           

              <mx:Style>

             

              .menuBarStyle

              {

              backgroundColor : #ff0000;

             

              }

             

             

              </mx:Style>

           

              <mx:MenuBar menuStyleName="menuBarStyle" id="myMenuBar" labelField="@label">

                  <mx:XMLList>

                      <menuitem label="MenuItem A">

                          <menuitem label="SubMenuItem A-1" enabled="false"/>

                          <menuitem label="SubMenuItem A-2"/>

                      </menuitem>

                      <menuitem label="MenuItem B"/>

                      <menuitem label="MenuItem C"/>

                      <menuitem label="MenuItem D">

                          <menuitem label="SubMenuItem D-1"

                              type="radio" groupName="one"/>

                          <menuitem label="SubMenuItem D-2"

                              type="radio" groupName="one"

                              selected="true"/>

                          <menuitem label="SubMenuItem D-3"

                              type="radio" groupName="one"/>

                      </menuitem>

                  </mx:XMLList>

             

              </mx:MenuBar>

           

           

           

           

          </mx:Application>

           

           

          I'm not sure about #2.

           

          hope this helps,

           

          Babo,

          • 2. Re: MenuBar -submenu color
            markuspedro Level 1

            Hi bobo,

            thank you for your replay. It's what i'm looking for.

            For the second question.. there is somebody??

             

            Thank's

            • 3. Re: MenuBar -submenu color
              markuspedro Level 1

              i've think an alghorithm to make what i want! ;-)

              • 4. Re: MenuBar -submenu color
                markuspedro Level 1

                hey babo, may i set transparency in menubarstyle?