Get value from NumericStepper and TextInput : NumericStepper « Components « Flex






Get value from NumericStepper and TextInput

Get value from NumericStepper and TextInput
      

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    applicationComplete="fullNameTextInput.setFocus()">
    <mx:Script>
        
        import mx.controls.Alert;
        public function showInfo():void
        {
            Alert.show("Your name is " + fullNameTextInput.text + " and your age is " + ageNS.value);
        }
      
    </mx:Script>
    <mx:Panel id="panel" x="10" y="10" width="250" height="200"
        layout="vertical" title="title" paddingLeft="5">
        <mx:Label text="My name is:" fontWeight="bold" />
        <mx:TextInput id="fullNameTextInput" />
        <mx:Label id="ageLabel" text="My age is:" fontWeight="bold" />
        <mx:NumericStepper id="ageNS" maximum="120" minimum="18" />
        <mx:CheckBox id="expertCheckBox" label="I'm a Flex Expert!" />
        <mx:Button label="Click me" click="showInfo()" />
    </mx:Panel>
</mx:Application>

   
    
    
    
    
    
  








Related examples in the same category

1.Use NumericStepper as itemEditor for DataGridUse NumericStepper as itemEditor for DataGrid
2.Use NumericStepper to choose valueUse NumericStepper to choose value
3.NumericStepper with NumericStepper with <mx:NumericStepper>
4.Use NumericStepper as item editor for a column of DataGrid controlUse NumericStepper as item editor for a column of DataGrid control
5.Use NumericStepper control as an inline item editorUse NumericStepper control as an inline item editor
6.Use a NumericStepper control to define a custom item editor as an MXML componentUse a NumericStepper control to define a custom item editor as an MXML component
7.NumericStepper minimum, maximum, stepSizeNumericStepper minimum, maximum, stepSize
8.Use NumericStepper to set selected index for ListUse NumericStepper to set selected index for List
9.Use NumericStepper to control the size of a PanelUse NumericStepper to control the size of a Panel
10.Contact Manager Panel with TextInput, NumericStepper, CheckBox, ColorPickerContact Manager Panel with TextInput, NumericStepper, CheckBox, ColorPicker
11.List NumericStepper cell rendererList NumericStepper cell renderer
12.Bind NumericStepper value to LabelBind NumericStepper value to Label
13.Specify the NumericStepper control as the item editor for a column of the DataGrid controlSpecify the NumericStepper control as the item editor for a column of the DataGrid control
14.Use NumericStepper, DateField, and CheckBox controls as the drop-in item renderers and item editors for a DataGrid control:Use NumericStepper, DateField, and CheckBox controls as the drop-in item renderers and item editors for a DataGrid control:
15.Use a NumericStepper control to edit the Price column of a DataGrid control.Use a NumericStepper control to edit the Price column of a DataGrid control.
16.Inline NumericStepperInline NumericStepper
17.Creating a simple inline item rendererCreating a simple inline item renderer
18.Inline NumericStepper RendererInline NumericStepper Renderer
19.Drop In NumericStepper item rendererDrop In NumericStepper item renderer