3 Replies Latest reply on Jul 30, 2009 1:38 AM by Antony Chauviré

    MenuBar

    Jim Daniel
      Is there a way to control the spacing between items of a menuBar?
        • 1. Re: MenuBar
          -Hob Level 1
          Use the horizontalGap style property. If you're in mxml you can just set it like:

          <mx:MenuBar horizontalGap="5"/>

          If you're in actionscript you'll need to use setStyle:

          var menuBar:MenuBar = new MenuBar();
          menuBar.setStyle('horizontalGap', 5);
          • 2. Re: MenuBar
            Jim Daniel Level 1
            -Hop,

            It seems that horizontalGap is not a style property of MenuBar. I check both the documentation on MenuBar and even tried it in the code (got an error message when I compiled). Didn't try the ActionScript version, just MXML.
            • 3. Re: MenuBar
              Antony Chauviré

              Hi,

               

              You set a style name like :

               

              .subMenu

              {

                   horizontalGap: 20;

              }

               

              and you set a style for your MenuBar :

               

              MenuBar

              {

                   menuStyleName: subMenu;

              }

               

              ;-)

               

              Tannoy