View comments | RSS feed
Methods | Properties | Effects | Events | Styles | Examples Frames | No Frames

mx.controls
Class NumericStepper

Inheritance ImageInheritance Image


class NumericStepper
extends mx.core.UIComponent

The NumericStepper control lets the user select a number from an ordered set. The NumericStepper control consists of a single line input text field and a pair of arrow buttons for stepping through the possible values. The up and down arrow keys also cycle through the values.

MXML Syntax

The <mx:NumericStepper> tag inherits all the properties of its parent classes, and the following properties:

 <mx:NumericStepper
maximum="10"
minimum="0"
stepSize="1"
value="0"
change="Event handler; no default."
draw="Event handler; no default."
/>

Click here to view the Examples

Methods

Methods inherited from class mx.core.UIComponent
drawFocus   getFocus   getFocusManager   setEnabled   setFocus  

Methods inherited from class mx.core.UIObject
addEventListener   applyProperties   buildDepthTable   commitProperties   constructObject2   createAccessibilityImplementation   createChildAtDepth   createChildren   createClassChildAtDepth   createClassObject   createEmptyObject   destroyObject   dispatchEvent   doLater   draw   drawRect   executeBindings   fillRect   findNextAvailableDepth   getRepeaterItem   getStyle   handleEvent   init   invalidate   invalidateLayout   invalidateProperties   invalidateSize   invalidateStyle   layoutChildren   measure   move   redraw   removeEventListener   setDepthAbove   setDepthBelow   setMask   setSize   setSizeNoLayout   setStyle   swapDepths  



Properties
       maximum: Number
Minimum range value.
       minimum: Number
Minimum range value.
       nextValue: Number    [Read-Only]
Next value that is in the step and range.
       previousValue: Number    [Read-Only]
Previous value that is in the step and range.
       stepSize: Number
Non zero unit change from the current value.
       value: Number
Value that is in the step and range.
staticversion: String
Version string for this class.

Properties inherited from class mx.core.UIComponent
enabled   errorString   tabEnabled   tabIndex   version  

Properties inherited from class mx.core.UIObject
alpha   baselinePosition   className   depth   documentDescriptor   height   heightFlex   id   instanceIndices   isDocument   kStretch   layoutHeight   layoutWidth   maxHeight   maxWidth   minHeight   minWidth   mouseX   mouseY   nestLevel   oldHeight   oldWidth   oldX   oldY   parent   parentApplication   parentDocument   percentHeight   percentWidth   preferredHeight   preferredWidth   repeaterIndices   scaleX   scaleY   styleName   tabEnabled   toolTip   version   visible   width   widthFlex   x   y  



Effects

Effects inherited from class mx.core.UIComponent
focusInEffect   focusOutEffect  

Effects inherited from class mx.core.UIObject
creationCompleteEffect   hideEffect   mouseDownEffect   mouseOutEffect   mouseOverEffect   mouseUpEffect   moveEffect   resizeEffect   showEffect  



Events
changeBroadcast when the value of the NumericStepper control changes as a result of user interaction. The event object contains the properties:
- target Reference to the component that triggered the event.
- type The name of the event, change.
drawBroadcast when an object is about to draw its graphics. The event object contains the properties:
- target Reference to the component that triggered the event.
- type The name of the event, draw.

Events inherited from class: mx.core.UIComponent
focusIn  focusOut  invalid  keyDown  keyUp  valid  valueCommitted 

Events inherited from class: mx.core.UIObject
creationComplete  dragComplete  dragDrop  dragEnter  dragExit  dragOver  draw  effectEnd  effectStart  hide  hideToolTip  initialize  load  mouseChangeSomewhere  mouseDown  mouseDownSomewhere  mouseMove  mouseMoveSomewhere  mouseOut  mouseOver  mouseUp  mouseUpSomewhere  move  resize  show  showToolTip  unload 



Styles

Styles inherited from class mx.core.UIComponent
backgroundAlpha   backgroundColor   backgroundDisabledColor   backgroundImage   backgroundSize   barColor   borderCapColor   borderColor   borderSides   borderStyle   borderThickness   cornerRadius   disabledColor   dropShadow   errorColor   fillColors   highlightColor   modalTransparency   scrollTrackColor   selectedFillColors   shadowCapColor   shadowColor   shadowDirection   shadowDistance   symbolBackgroundColor   symbolBackgroundDisabledColor   symbolBackgroundPressedColor   symbolColor   symbolDisabledColor   themeColor  

Styles inherited from class mx.core.UIObject
color   fontFamily   fontSize   fontStyle   fontWeight   horizontalGap   leading   marginLeft   marginRight   textAlign   textDecoration   textIndent   verticalGap  



Property Detail

maximum

maximum: Number  

Minimum range value. The default value is 0.


minimum

minimum: Number  

Minimum range value. The default value is 0.


nextValue

nextValue: Number   [Read-Only]

Next value that is in the step and range.


previousValue

previousValue: Number   [Read-Only]

Previous value that is in the step and range.


stepSize

stepSize: Number  

Non zero unit change from the current value. It can contain a number with up to three decimal places. The default value is 1.


value

value: Number  

Value that is in the step and range.


version

static  version: String  

Version string for this class.


Examples
NumericStepperExample.mxml
<?xml version="1.0"?>
<!-- Simple example to demonstrate the NumericStepper control -->
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FFFFFF">

    <mx:Script>
        <![CDATA[
       
           function showValue(event)
	   {
	      stepValue.text = "Value Selected is "  + event.target.value;
	   }

      ]]>
    </mx:Script>

    <mx:Panel title="Numeric Stepper Panel">

        <mx:NumericStepper id="stepper" change="showValue(event);" minimum="0" maximum="15"/>
        <mx:Label id="stepValue" text=" Default value is: 0" color="#0000FF"/>

    </mx:Panel>

</mx:Application>
       




Comments


Niklas said on Feb 16, 2006 at 8:58 AM :
Under "Property Detail" > maximum

"Minimum range value. The default value is 0."

Shouldn't it be

"Maximum range value. The default....."?
alongley said on Mar 16, 2006 at 1:48 PM :
If a numeric stepper control's value is preceded by a 0, the value is assumed to be octal and upon leaving the field, the numeric stepper instantly, automatically converts it to the equivalent decimal value. For example, if you enter 0300 in a numeric stepper (such as if you wanted to enter military hours and minutes in HHMM format), and hit Tab, the numeric stepper value will change to the decimal value 192. I would classify this as a bug since there is no clear way to control the behavior, i.e., a property setting to control the behavior.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flex/15/asdocs_en/mx/controls/NumericStepper.html