Avg. Rating 3.5

Problem

You want to use numeric stepper and its value should not be editable by user.

Solution

There is no property to get this, but we can get it using mx_internal.

Detailed explanation

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="horizontal"
    creationComplete="onCreationComplete()">
    
    <mx:Script>
        <![CDATA[
           
            private function onCreationComplete():void
            {
                nstepper.mx_internal::inputField.editable = false;
            }
        ]]>
    </mx:Script>
    
    <mx:NumericStepper id="nstepper" value="1" stepSize="1"
maximum="10"/>
    
</mx:Application>


 


+
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

Report abuse

Related recipes