0 Replies Latest reply on Mar 18, 2010 12:19 PM by techdude1234

    Changing TOggleButtonBar selected index using ActionsScript!


      Hey Guys,

      Dont know what I am missing here.. I have a togglebutton basr as follows


        // THis is the dataprovider for the toggle button bar

        private var _sortOptionLabels:Array = ["test1","test2","test3"];


      //THe toggle button bar

      <mx:ToggleButtonBar   focusEnabled="true" tabEnabled="true" toggleOnClick="true" x="{listControlMainCanvas.x + sortByText.width}" y="{sortByText.y  }" id="sortToggleButtonBar" dataProvider="{_sortOptionLabels}"  itemClick="sortToggleButtonBarClickedEventHandler(event)"/>


      .. How I am trying to change the selected index


      1] Instantiate the view that contains this form

      2] get a reference to this toggle button bar

      3] change the selected index to 1



      What I See is .. no matter what I am doing the selected index stays at 0!!!!!!!


      Am I Missing anything??


      Thanks a lot for your help in advance