Focus management and keyboard control : Focus « Components « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Components » FocusScreenshots 
Focus management and keyboard control
Focus management and keyboard control
          

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
      
    
        private function reset(event:Event):void {
          focusManager.setFocus(d);
        }
    
    
    </mx:Script>
    <mx:VBox height="100%">
      <mx:Grid>
        <mx:GridRow>
          <mx:GridItem>
            <mx:TextInput id="a" tabIndex="1" />
          </mx:GridItem>
          <mx:GridItem>
            <mx:TextInput id="c" tabIndex="3" />
          </mx:GridItem>
        </mx:GridRow>
        <mx:GridRow>
          <mx:GridItem>
            <mx:TextInput id="b" tabIndex="2" />
          </mx:GridItem>
          <mx:GridItem>
            <mx:TextInput id="d" tabIndex="4" />
          </mx:GridItem>
        </mx:GridRow>
      </mx:Grid>
      <mx:Button label="Reset" click="reset(event)"/>
    </mx:VBox>

</mx:Application>

   
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Use focus manager to set focus to a controlUse focus manager to set focus to a control
2.Handle focusIn and focusOut EventsHandle focusIn and focusOut Events
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.