3 Replies Latest reply on Nov 1, 2010 10:07 AM by Arun Ganesh

    Auto Resize ToggleButtonBar Button

    Arun Ganesh Level 3


           I have using ToggleButtonBar in my application. I want to resize the ToggleButtonBar Button according to the size of label. Now what happens, it truncate the button label with some fixed size.

      Anyone have ideas to resolve my problem.


      Thanks in Advance.



      Arun P. Ganesh

        • 2. Re: Auto Resize ToggleButtonBar Button
          Gregory Lafrance Level 6

          The buttons resize in the following code. How does your differ?


          <?xml version="1.0"?>
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
                import mx.collections.ArrayCollection;
                [Bindable] private var ac1:ArrayCollection = new ArrayCollection(["one", "two", "three"]);
                [Bindable] private var ac2:ArrayCollection = new ArrayCollection(["string one", "string two", "string three"]);
            <mx:ToggleButtonBar id="tbb" dataProvider="{ac1}"/>
            <mx:Button label="Change Data Provider"

          If this post answers your question or helps, please mark it as such.

          Greg Lafrance - Flex 2 and 3 ACE certified


          Flex Training, Tutoring, Contracting, and Support Services

          • 3. Re: Auto Resize ToggleButtonBar Button
            Arun Ganesh Level 3

            Actually I gave Static width for ToggleButtonBar. Thats y it stuck with problem. Now it is working fine.