0 Replies Latest reply on Apr 12, 2012 7:43 AM by kkudiksx

    ToggleButtonBar in Flex 4.5 causes all buttons to be "selected"

    kkudiksx Level 1

      Hi

       

      I have a ToggleButtonBar as follows:

       

       

       

      
      <mx:ToggleButtonBar id="bBar"
      
      
      
      
      
      
      
      
      
      
      
      
      dataProvider="{ menuItems }"
      
      
      
      
      
      
      
      
      
      
      
      
      styleName="sectionsBar"
      
      
      
      
      
      
      
      
      
      
      
      
      focusEnabled="false"
      
      
      
      
      
      
      
      
      
      
      
      
      mouseDown="fnMouseDown(event)"
      
      
      
      
      
      
      
      
      
      
      
      
      itemClick="model.navigationBarHandler(event)"
      
      
      
      
      
      
      
      
      
      
      
      
      selectedButtonTextStyleName="sectionsBarSelectedButton"/>
      
      
      

       

      menuItems is an IList of ToolbarItem objects.

       

          public class ToolbarItem

          {

       

       

              [Bindable]

              public var label:String;

       

       

              [Bindable]

              public var eventName:String;

       

       

              [Bindable]

              public var enabled:Boolean;

       

       

              public function ToolbarItem(label:String = null, eventName:String = null,

                                          enabled:Boolean = true)

              {

                  this.label = label;

                  this.eventName = eventName;

                  this.enabled = enabled;

              }

          }

       

       

      in my css file I have the following:

       

      .sectionsBarSelectedButton

      {

                color: #FFFFFF;

       

       

                /*textRollOverColor: #F9B100;*/

                font-weight: bold;

      }

       

       

      However, when I run the toolbar...all the buttons are shown with the same colour as in the selectedButtonStyleName

       

      Am I doing something wrong?