1 Reply Latest reply on Sep 20, 2010 10:05 AM by Flex harUI

    Flex 4 - Focus Manager Problem




      I have some problem in Flex 4. I have one Viewstack, in side that view stack i have lot of canvas. In my condition am going to click one button at that time am selecting one canvas and setting the focus inside that canvas textinput. but its not working. can any one give the solution for this.



      here is the code

                  private function testing():void{
                      vsMain.selectedChild = test;


      <mx:ViewStack id="vsMain" width="100%" height="100%" creationPolicy="all">

           <mx:Canvas id="empty">





           <mx:Canvas id="test" label="testing Items" width="100%" height="100%">
                     <mx:FormItem label="Enter First Name" focusEnabled="true">
                          <mx:TextInput id="firstName" />



      <mx:Button id="sa" label="Checking" click="{testing();}"/>