Set List selected item : List Selection « 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 » List SelectionScreenshots 
Set List selected item
Set List selected item
           

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:VBox>
        <mx:List id="list" width="100">
            <mx:ArrayCollection>
                <mx:Array>
                    <mx:String>a</mx:String>
                    <mx:String>b</mx:String>
                    <mx:String>c</mx:String>
                    <mx:String>d</mx:String>
                </mx:Array>
            </mx:ArrayCollection>
        </mx:List>
        <mx:NumericStepper id="stepper" minimum="0" maximum="3" change="list.selectedIndex = stepper.value" />
    </mx:VBox>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Selected item and selected index from ListSelected item and selected index from List
2.Using binding to capture the selection of a List-based componentUsing binding to capture the selection of a List-based component
3.Set selected index for ListSet selected index for List
4.Set selection color for ListSet selection color for List
5.Spark List Selection change listenerSpark List Selection change listener
6.Enable multiple selection for the List controlEnable multiple selection for the List control
www_.__j__a_v___a__2s_.___c__o_m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.