2 Replies Latest reply on Mar 14, 2009 11:12 AM by Keith Dodd

    ButtonBar: Multiple rows?

    Keith Dodd Level 1
      I have a horizontal buttonBar with number of options that forces horizontal scrolling to see all.
      Is there a way to wrap so that if total width exceeds container's width, it will just start a second,etc. row?

        • 1. Re: ButtonBar: Multiple rows?
          -Hob Level 1
          It's not as easy as flipping a switch. You'd have to do some monkeying around to get it to work. ButtonBar is basically a fancy Box component. You could sub-class ButtonBar and in the constructor override the layoutObject property (which is an mx_internal property, so you'll need to import mx.core.mx_internal to make that property available to yourself). You'd then have to sub-class BoxLayout and modify it to do what you'd like.

          In the BoxLayout sub-class, you'd probably just have to override updateDisplayList() and layout your buttons in multiple rows if unscaledWidth < measuredWidth.

          Hope that helps.
          • 2. Re: ButtonBar: Multiple rows?
            Keith Dodd Level 1
            Thanks for advice!
            Doing it may be beyond my reach ability, but makes sense, and I'll give it a try.