<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flex Examples &#187; NumericStepper</title>
	<atom:link href="http://blog.flexexamples.com/category/halo/numericstepper/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting a border on specific sides of a NumericStepper control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/27/setting-a-border-on-specific-sides-of-a-numericstepper-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/27/setting-a-border-on-specific-sides-of-a-numericstepper-control-in-flex/#comments</comments>
		<pubDate>Tue, 27 May 2008 13:55:30 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[NumericStepper]]></category>
		<category><![CDATA[borderSides]]></category>
		<category><![CDATA[borderStyle]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/27/setting-a-border-on-specific-sides-of-a-numericstepper-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can apply a border to specific sides (top, bottom, left, right) of a Flex NumericStepper control by setting the borderStyle and borderSides styles.</p> <p class="note">The borderSides style is only supported when the borderStyle style is set to &#8220;solid&#8221;.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderSides_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can apply a border to specific sides (top, bottom, left, right) of a Flex NumericStepper control by setting the <code>borderStyle</code> and <code>borderSides</code> styles.</p>
<p class="note">The <code>borderSides</code> style is only supported when the <code>borderStyle</code> style is set to &#8220;solid&#8221;.</p>
<p>Full code after the jump.</p>
<p><span id="more-647"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderSides_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/27/setting-a-border-on-specific-sides-of-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function checkBox_change(evt:Event):void {
                var sidesStr:String;
                var sidesArr:Array = [];
                if (leftCheckBox.selected) {
                    sidesArr.push("left");
                }
                if (rightCheckBox.selected) {
                    sidesArr.push("right");
                }
                if (topCheckBox.selected) {
                    sidesArr.push("top");
                }
                if (bottomCheckBox.selected) {
                    sidesArr.push("bottom");
                }
                sidesStr = sidesArr.join(" ");
                numericStepper.setStyle("borderSides", sidesStr);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="border left:"&gt;
                &lt;mx:CheckBox id="leftCheckBox"
                        selected="true"
                        change="checkBox_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="border right:"&gt;
                &lt;mx:CheckBox id="rightCheckBox"
                        selected="true"
                        change="checkBox_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="border top:"&gt;
                &lt;mx:CheckBox id="topCheckBox"
                        selected="true"
                        change="checkBox_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="border bottom:"&gt;
                &lt;mx:CheckBox id="bottomCheckBox"
                        selected="true"
                        change="checkBox_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="borderThickness:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="0"
                        maximum="10"
                        value="4"
                        snapInterval="1"
                        tickInterval="1"
                        liveDragging="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            borderStyle="solid"
            borderThickness="{slider.value}"
            borderSides="left right top bottom" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderSides_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderSides_test/bin/main.html" width="100%" height="300"></iframe></p>
<p>You can also set the <code>borderSides</code> style in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderSides_test/bin/srcview/source/main1.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/27/setting-a-border-on-specific-sides-of-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        NumericStepper {
            borderStyle: solid;
            borderSides: top, bottom;
        }
    &lt;/mx:Style&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="borderThickness:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="0"
                        maximum="10"
                        value="4"
                        snapInterval="1"
                        tickInterval="1"
                        liveDragging="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            borderThickness="{slider.value}" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting a border on specific sides of a NumericStepper control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/27/setting-a-border-on-specific-sides-of-a-numericstepper-control-in-flex/',contentID: 'post-647',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'borderSides,borderStyle',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/05/27/setting-a-border-on-specific-sides-of-a-numericstepper-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting the border thickness on a NumericStepper control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/27/setting-the-border-thickness-on-a-numericstepper-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/27/setting-the-border-thickness-on-a-numericstepper-control-in-flex/#comments</comments>
		<pubDate>Tue, 27 May 2008 08:21:02 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[NumericStepper]]></category>
		<category><![CDATA[borderStyle]]></category>
		<category><![CDATA[borderThickness]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/27/setting-the-border-thickness-on-a-numericstepper-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set the border thickness on a Flex NumericStepper control by setting the borderThickness style.</p> <p class="note">The borderThickness style is only supported when the borderStyle style is set to &#8220;solid&#8221;.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderThickness_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/05/27/setting-the-border-thickness-on-a-numericstepper-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the border thickness on a Flex NumericStepper control by setting the <code>borderThickness</code> style.</p>
<p class="note">The <code>borderThickness</code> style is only supported when the <code>borderStyle</code> style is set to &#8220;solid&#8221;.</p>
<p>Full code after the jump.</p>
<p><span id="more-646"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderThickness_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/27/setting-the-border-thickness-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="borderThickness:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="0"
                        maximum="10"
                        value="1"
                        snapInterval="1"
                        tickInterval="1"
                        liveDragging="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            borderStyle="solid"
            borderThickness="{slider.value}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderThickness_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderThickness_test/bin/main.html" width="100%" height="150"></iframe></p>
<p>You can also set the borderThickness style in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderThickness_test/bin/srcview/source/main1.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/27/setting-the-border-thickness-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        NumericStepper {
            borderStyle: solid;
            borderThickness: 10;
        }
    &lt;/mx:Style&gt;

    &lt;mx:NumericStepper id="numericStepper" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the borderThickness style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderThickness_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/27/setting-the-border-thickness-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.SliderEvent;

            private function init():void {
                numericStepper.setStyle("borderStyle", "solid");
            }

            private function slider_change(evt:SliderEvent):void {
                numericStepper.setStyle("borderThickness", evt.value);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="borderThickness:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="0"
                        maximum="10"
                        value="1"
                        snapInterval="1"
                        tickInterval="1"
                        liveDragging="true"
                        change="slider_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            initialize="init();" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the border thickness on a NumericStepper control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/27/setting-the-border-thickness-on-a-numericstepper-control-in-flex/',contentID: 'post-646',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'borderStyle,borderThickness',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/05/27/setting-the-border-thickness-on-a-numericstepper-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting the border color on a NumericStepper control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/26/setting-the-border-color-on-a-numericstepper-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/26/setting-the-border-color-on-a-numericstepper-control-in-flex/#comments</comments>
		<pubDate>Tue, 27 May 2008 05:16:11 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[NumericStepper]]></category>
		<category><![CDATA[borderColor]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/26/setting-the-border-color-on-a-numericstepper-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set the border color on a Flex NumericStepper control by setting the borderColor style.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/05/26/setting-the-border-color-on-a-numericstepper-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:ApplicationControlBar dock="true"&#62; &#60;mx:Form styleName="plain"&#62; &#60;mx:FormItem label="borderColor:"&#62; &#60;mx:ColorPicker id="colorPicker" /&#62; &#60;/mx:FormItem&#62; &#60;/mx:Form&#62; &#60;/mx:ApplicationControlBar&#62; &#60;mx:NumericStepper [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the border color on a Flex NumericStepper control by setting the <code>borderColor</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-645"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/26/setting-the-border-color-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="borderColor:"&gt;
                &lt;mx:ColorPicker id="colorPicker" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            borderColor="{colorPicker.selectedColor}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderColor_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderColor_test/bin/main.html" width="100%" height="250"></iframe></p>
<p>You can also set the <code>borderColor</code> style using an external .CSS file or in an &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderColor_test/bin/srcview/source/main1.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/26/setting-the-border-color-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        NumericStepper {
            borderColor: red;
        }
    &lt;/mx:Style&gt;

    &lt;mx:NumericStepper id="numericStepper" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>borderColor</code> style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_borderColor_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/26/setting-the-border-color-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.ColorPickerEvent;

            private function colorPicker_change(evt:ColorPickerEvent):void {
                numericStepper.setStyle("borderColor", evt.color);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="borderColor:"&gt;
                &lt;mx:ColorPicker id="colorPicker"
                        change="colorPicker_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the border color on a NumericStepper control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/26/setting-the-border-color-on-a-numericstepper-control-in-flex/',contentID: 'post-645',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'borderColor',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/05/26/setting-the-border-color-on-a-numericstepper-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the icon color on a disabled NumericStepper control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/25/setting-the-icon-color-on-a-disabled-numericstepper-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/25/setting-the-icon-color-on-a-disabled-numericstepper-control-in-flex/#comments</comments>
		<pubDate>Mon, 26 May 2008 03:53:51 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[NumericStepper]]></category>
		<category><![CDATA[disabledIconColor]]></category>
		<category><![CDATA[enabled]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/25/setting-the-icon-color-on-a-disabled-numericstepper-control-in-flex/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/05/25/setting-the-text-color-on-a-disabled-numericstepper-control-in-flex/">Setting the text color on a disabled NumericStepper control in Flex</a>, we saw how to set the text color for a disabled Flex NumericStepper control by setting the disabledColor style.</p> <p>The following example shows how you can set the icon color for a disabled Flex NumericStepper control by setting the [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/05/25/setting-the-text-color-on-a-disabled-numericstepper-control-in-flex/">Setting the text color on a disabled NumericStepper control in Flex</a>, we saw how to set the text color for a disabled Flex NumericStepper control by setting the <code>disabledColor</code> style.</p>
<p>The following example shows how you can set the icon color for a disabled Flex NumericStepper control by setting the <code>disabledIconColor</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-644"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_disabledIconColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/25/setting-the-icon-color-on-a-disabled-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="enabled:"&gt;
                &lt;mx:CheckBox id="checkBox" selected="true" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="disabledIconColor:"&gt;
                &lt;mx:ColorPicker id="colorPicker" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            enabled="{checkBox.selected}"
            disabledIconColor="{colorPicker.selectedColor}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_disabledIconColor_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_disabledIconColor_test/bin/main.html" width="100%" height="250"></iframe></p>
<p>You can also set the <code>disabledIconColor</code> style using an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_disabledIconColor_test/bin/srcview/source/main1.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/25/setting-the-icon-color-on-a-disabled-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        NumericStepper {
            disabledIconColor: red;
        }
    &lt;/mx:Style&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="enabled:"&gt;
                &lt;mx:CheckBox id="checkBox" selected="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            enabled="{checkBox.selected}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>disabledIconColor</code> style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_disabledIconColor_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/25/setting-the-icon-color-on-a-disabled-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.ColorPickerEvent;

            private function colorPicker_change(evt:ColorPickerEvent):void {
                numericStepper.setStyle("disabledIconColor", evt.color);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="enabled:"&gt;
                &lt;mx:CheckBox id="checkBox" selected="true" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="disabledIconColor:"&gt;
                &lt;mx:ColorPicker id="colorPicker"
                        change="colorPicker_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            enabled="{checkBox.selected}" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the icon color on a disabled NumericStepper control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/25/setting-the-icon-color-on-a-disabled-numericstepper-control-in-flex/',contentID: 'post-644',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'disabledIconColor,enabled',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/05/25/setting-the-icon-color-on-a-disabled-numericstepper-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the text color on a disabled NumericStepper control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/25/setting-the-text-color-on-a-disabled-numericstepper-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/25/setting-the-text-color-on-a-disabled-numericstepper-control-in-flex/#comments</comments>
		<pubDate>Mon, 26 May 2008 03:42:19 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[NumericStepper]]></category>
		<category><![CDATA[disabledColor]]></category>
		<category><![CDATA[enabled]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/25/setting-the-text-color-on-a-disabled-numericstepper-control-in-flex/</guid>
		<description><![CDATA[<p>Continuing on the theme of <a href="http://blog.flexexamples.com/category/numericstepper/">NumericStepper examples</a>, the following example shows how you can set the text color for a disabled Flex NumericStepper control by setting the disabledColor style.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_disabledColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/05/25/setting-the-text-color-on-a-disabled-numericstepper-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:ApplicationControlBar dock="true"&#62; &#60;mx:Form styleName="plain"&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing on the theme of <a href="http://blog.flexexamples.com/category/numericstepper/">NumericStepper examples</a>, the following example shows how you can set the text color for a disabled Flex NumericStepper control by setting the <code>disabledColor</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-643"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_disabledColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/25/setting-the-text-color-on-a-disabled-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="enabled:"&gt;
                &lt;mx:CheckBox id="checkBox" selected="true" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="disabledColor:"&gt;
                &lt;mx:ColorPicker id="colorPicker" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            enabled="{checkBox.selected}"
            disabledColor="{colorPicker.selectedColor}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_disabledColor_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_disabledColor_test/bin/main.html" width="100%" height="250"></iframe></p>
<p>You can also set the <code>disabledColor</code> style in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_disabledColor_test/bin/srcview/source/main1.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/25/setting-the-text-color-on-a-disabled-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        NumericStepper {
            disabledColor: red;
        }
    &lt;/mx:Style&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="enabled:"&gt;
                &lt;mx:CheckBox id="checkBox" selected="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            enabled="{checkBox.selected}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>disabledColor</code> style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_disabledColor_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/25/setting-the-text-color-on-a-disabled-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.ColorPickerEvent;

            private function colorPicker_change(evt:ColorPickerEvent):void {
                numericStepper.setStyle("disabledColor", evt.color);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="enabled:"&gt;
                &lt;mx:CheckBox id="checkBox" selected="true" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="disabledColor:"&gt;
                &lt;mx:ColorPicker id="colorPicker"
                        change="colorPicker_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            enabled="{checkBox.selected}" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the text color on a disabled NumericStepper control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/25/setting-the-text-color-on-a-disabled-numericstepper-control-in-flex/',contentID: 'post-643',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'disabledColor,enabled',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/05/25/setting-the-text-color-on-a-disabled-numericstepper-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the focus thickness on a NumericStepper control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/24/setting-the-focus-thickness-on-a-numericstepper-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/24/setting-the-focus-thickness-on-a-numericstepper-control-in-flex/#comments</comments>
		<pubDate>Sun, 25 May 2008 02:29:18 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[NumericStepper]]></category>
		<category><![CDATA[focusThickness]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/24/setting-the-focus-thickness-on-a-numericstepper-control-in-flex/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/05/23/setting-the-focus-alpha-on-a-numericstepper-control-in-flex/">&#8220;Setting the focus alpha on a NumericStepper control in Flex&#8221;</a>, we saw how you could set the alpha of the focus rectangle for a Flex NumericStepper control by setting the focusAlpha style.</p> <p>The following example shows how you can set the focus thickness of the focus rectangle by setting the [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/05/23/setting-the-focus-alpha-on-a-numericstepper-control-in-flex/">&#8220;Setting the focus alpha on a NumericStepper control in Flex&#8221;</a>, we saw how you could set the alpha of the focus rectangle for a Flex NumericStepper control by setting the <code>focusAlpha</code> style.</p>
<p>The following example shows how you can set the focus thickness of the focus rectangle by setting the <code>focusThickness</code> style on the Flex NumericStepper control.</p>
<p>Full code after the jump.</p>
<p><span id="more-642"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusThickness_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/24/setting-the-focus-thickness-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.NumericStepperEvent;

            private function numericStepper_change(evt:NumericStepperEvent):void {
                // reset focus rect
                focusManager.setFocus(btn);
                focusManager.setFocus(numericStepper);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button id="btn"
                label="click here to remove focus" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormItem label="focusThickness:"&gt;
            &lt;mx:NumericStepper id="numericStepper"
                    minimum="0"
                    maximum="10"
                    focusThickness="{numericStepper.value}"
                    change="numericStepper_change(event);" /&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusThickness_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusThickness_test/bin/main.html" width="100%" height="150"></iframe></p>
<p>You can also set the <code>focusThickness</code> style using an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusThickness_test/bin/srcview/source/main1.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/24/setting-the-focus-thickness-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        NumericStepper {
            focusThickness: 10;
        }
    &lt;/mx:Style&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button id="btn"
                label="click here to remove focus" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormItem label="focusThickness:"&gt;
            &lt;mx:NumericStepper id="numericStepper"
                    minimum="0"
                    maximum="10" /&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>focusThickness</code> style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusThickness_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/24/setting-the-focus-thickness-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.NumericStepperEvent;

            private function numericStepper_change(evt:NumericStepperEvent):void {
                numericStepper.setStyle("focusThickness", evt.value);
                // reset focus rect
                focusManager.setFocus(btn);
                focusManager.setFocus(numericStepper);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button id="btn"
                label="click here to remove focus" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormItem label="focusThickness:"&gt;
            &lt;mx:NumericStepper id="numericStepper"
                    minimum="0"
                    maximum="10"
                    change="numericStepper_change(event);" /&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the focus thickness on a NumericStepper control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/24/setting-the-focus-thickness-on-a-numericstepper-control-in-flex/',contentID: 'post-642',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'focusThickness',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/05/24/setting-the-focus-thickness-on-a-numericstepper-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting the focus alpha on a NumericStepper control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/23/setting-the-focus-alpha-on-a-numericstepper-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/23/setting-the-focus-alpha-on-a-numericstepper-control-in-flex/#comments</comments>
		<pubDate>Sat, 24 May 2008 06:27:53 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[FocusManager]]></category>
		<category><![CDATA[NumericStepper]]></category>
		<category><![CDATA[focusAlpha]]></category>
		<category><![CDATA[setFocus()]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/23/setting-the-focus-alpha-on-a-numericstepper-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set the focus alpha on a Flex NumericStepper control by setting the focusAlpha style.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusAlpha_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/05/23/setting-the-focus-alpha-on-a-numericstepper-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Script&#62; &#60;![CDATA[ import mx.events.NumericStepperEvent; private function numericStepper_change(evt:NumericStepperEvent):void { // reset focus focusManager.setFocus(btn); focusManager.setFocus(numericStepper); [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the focus alpha on a Flex NumericStepper control by setting the <code>focusAlpha</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-641"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusAlpha_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/23/setting-the-focus-alpha-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.NumericStepperEvent;

            private function numericStepper_change(evt:NumericStepperEvent):void {
                // reset focus
                focusManager.setFocus(btn);
                focusManager.setFocus(numericStepper);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button id="btn" label="click here to remove focus" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            minimum="0.0"
            maximum="1.0"
            value="0.5"
            stepSize="0.1"
            textAlign="center"
            focusAlpha="{numericStepper.value}"
            change="numericStepper_change(event);" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusAlpha_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusAlpha_test/bin/main.html" width="100%" height="150"></iframe></p>
<p>You can also set the <code>focusAlpha</code> style in an external .CSS file or &lt;mx:Style /&gt; block, as shown in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusAlpha_test/bin/srcview/source/main1.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/23/setting-the-focus-alpha-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        NumericStepper {
            focusAlpha: 1.0;
        }
    &lt;/mx:Style&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button id="btn" label="click here to remove focus" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            minimum="0.0"
            maximum="1.0"
            value="1.0"
            stepSize="0.1"
            textAlign="center"/&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or you can set the <code>focusAlpha</code> style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_focusAlpha_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/23/setting-the-focus-alpha-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.NumericStepperEvent;

            private function numericStepper_change(evt:NumericStepperEvent):void {
                numericStepper.setStyle("focusAlpha", evt.value);
                // reset focus
                focusManager.setFocus(btn);
                focusManager.setFocus(numericStepper);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button id="btn" label="click here to remove focus" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            minimum="0.0"
            maximum="1.0"
            value="0.5"
            stepSize="0.1"
            textAlign="center"
            change="numericStepper_change(event);" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the focus alpha on a NumericStepper control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/23/setting-the-focus-alpha-on-a-numericstepper-control-in-flex/',contentID: 'post-641',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'focusAlpha,setFocus()',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/05/23/setting-the-focus-alpha-on-a-numericstepper-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the background color and background alpha for a NumericStepper control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/23/setting-the-background-color-and-background-alpha-for-a-numericstepper-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/23/setting-the-background-color-and-background-alpha-for-a-numericstepper-control-in-flex/#comments</comments>
		<pubDate>Sat, 24 May 2008 01:06:34 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[NumericStepper]]></category>
		<category><![CDATA[backgroundAlpha]]></category>
		<category><![CDATA[backgroundColor]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/23/setting-the-background-color-and-background-alpha-for-a-numericstepper-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set the background color and background alpha for a Flex NumericStepper control by setting the backgroundColor and backgroundAlpha styles.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_backgroundColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/05/23/setting-the-background-color-and-background-alpha-for-a-numericstepper-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:ApplicationControlBar dock="true"&#62; &#60;mx:Form styleName="plain"&#62; &#60;mx:FormItem label="backgroundAlpha:"&#62; &#60;mx:HSlider id="slider" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the background color and background alpha for a Flex NumericStepper control by setting the <code>backgroundColor</code> and <code>backgroundAlpha</code> styles.</p>
<p>Full code after the jump.</p>
<p><span id="more-640"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_backgroundColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/23/setting-the-background-color-and-background-alpha-for-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="backgroundAlpha:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="0.0"
                        maximum="1.0"
                        value="1.0"
                        snapInterval="0.1"
                        tickInterval="0.1"
                        liveDragging="true" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="backgroundColor:"&gt;
                &lt;mx:ColorPicker id="colorPicker"
                        selectedColor="white" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            backgroundAlpha="{slider.value}"
            backgroundColor="{colorPicker.selectedColor}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_backgroundColor_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_backgroundColor_test/bin/main.html" width="100%" height="300"></iframe></p>
<p>You can also set the <code>backgroundAlpha</code> and <code>backgroundColor</code> styles in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_backgroundColor_test/bin/srcview/source/main1.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/23/setting-the-background-color-and-background-alpha-for-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        NumericStepper {
            backgroundAlpha: 0.5;
            backgroundColor: red;
        }
    &lt;/mx:Style&gt;

    &lt;mx:NumericStepper id="numericStepper" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or you can set the <code>backgroundAlpha</code> and <code>backgroundColor</code> styles using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_backgroundColor_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/23/setting-the-background-color-and-background-alpha-for-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function init():void {
                numericStepper.setStyle("backgroundAlpha", 0.5);
                numericStepper.setStyle("backgroundColor", "red");
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:NumericStepper id="numericStepper"
            creationComplete="init();" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the background color and background alpha for a NumericStepper control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/23/setting-the-background-color-and-background-alpha-for-a-numericstepper-control-in-flex/',contentID: 'post-640',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'backgroundAlpha,backgroundColor',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/05/23/setting-the-background-color-and-background-alpha-for-a-numericstepper-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Changing the up arrow skin and down arrow skin on a NumericStepper control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/20/changing-the-up-arrow-skin-and-down-arrow-skin-on-a-numericstepper-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/20/changing-the-up-arrow-skin-and-down-arrow-skin-on-a-numericstepper-control-in-flex/#comments</comments>
		<pubDate>Tue, 20 May 2008 15:53:37 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[NumericStepper]]></category>
		<category><![CDATA[downArrowSkin]]></category>
		<category><![CDATA[upArrowSkin]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/20/changing-the-up-arrow-skin-and-down-arrow-skin-on-a-numericstepper-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can change the down arrow skin and up arrow skin in a Flex NumericStepper control by setting the downArrowSkin and upArrowSkin styles using MXML, CSS, and ActionScript.</p> <p>Full code after the jump.</p> <p></p> <p>The following example shows how you can embed the arrow skins using an inline @Embed() in [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can change the down arrow skin and up arrow skin in a Flex NumericStepper control by setting the <code>downArrowSkin</code> and <code>upArrowSkin</code> styles using MXML, CSS, and ActionScript.</p>
<p>Full code after the jump.</p>
<p><span id="more-636"></span></p>
<p>The following example shows how you can embed the arrow skins using an inline <code>@Embed()</code> in MXML:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_downArrowSkin_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/20/changing-the-up-arrow-skin-and-down-arrow-skin-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button label="Click here to remove focus from the NumericStepper control" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            downArrowSkin="@Embed('assets/bullet_arrow_down.png')"
            upArrowSkin="@Embed('assets/bullet_arrow_up.png')" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_downArrowSkin_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_downArrowSkin_test/bin/main.html" width="100%" height="150"></iframe></p>
<p>The following example shows how you can embed the arrow skins using <code>Embed()</code> in an &lt;mx:Style /&gt; block:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_downArrowSkin_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/20/changing-the-up-arrow-skin-and-down-arrow-skin-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        NumericStepper {
            downArrowSkin: Embed("assets/bullet_arrow_down.png");
            upArrowSkin: Embed("assets/bullet_arrow_up.png");
        }
    &lt;/mx:Style&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button label="Click here to remove focus from NumericStepper control" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>The following example shows how you can embed the arrow skins using the [Embed] metadata and bindings in your MXML:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_downArrowSkin_test/bin/srcview/source/main3.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/20/changing-the-up-arrow-skin-and-down-arrow-skin-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            [Bindable]
            [Embed("assets/bullet_arrow_down.png")]
            private var downArrowIcon:Class;

            [Bindable]
            [Embed("assets/bullet_arrow_up.png")]
            private var upArrowIcon:Class;
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button label="Click here to remove focus from NumericStepper control" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            downArrowSkin="{downArrowIcon}"
            upArrowSkin="{upArrowIcon}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>The following example shows how you can embed the arrow skins using the [Embed] metadata and ActionScript:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_downArrowSkin_test/bin/srcview/source/main4.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/20/changing-the-up-arrow-skin-and-down-arrow-skin-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            [Embed("assets/bullet_arrow_down.png")]
            private var downArrowIcon:Class;

            [Embed("assets/bullet_arrow_up.png")]
            private var upArrowIcon:Class;

            private function init():void {
                numericStepper.setStyle("downArrowSkin", downArrowIcon);
                numericStepper.setStyle("upArrowSkin", upArrowIcon);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button label="Click here to remove focus from NumericStepper control" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper" initialize="init();" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>The following example shows how you can embed the arrow skins by extending the NumericStepper control using ActionScript:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_downArrowSkin_test/bin/srcview/source/main5.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/20/changing-the-up-arrow-skin-and-down-arrow-skin-on-a-numericstepper-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:comps="comps.*"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button label="Click here to remove focus from NumericStepper control" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;comps:MyNumericStepper id="numericStepper" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_downArrowSkin_test/bin/srcview/source/comps/MyNumericStepper.as.html">comps/MyNumericStepper.as</a></p>
<pre class="code">
/**
 * http://blog.flexexamples.com/2008/05/20/changing-the-up-arrow-skin-and-down-arrow-skin-on-a-numericstepper-control-in-flex/
 */
package comps {
    import mx.controls.NumericStepper;

    public class MyNumericStepper extends NumericStepper {
        [Embed("assets/bullet_arrow_down.png")]
        public var downArrowIcon:Class;

        [Embed("assets/bullet_arrow_up.png")]
        public var upArrowIcon:Class;

        public function MyNumericStepper() {
            super();
            init();
        }

        private function init():void {
            setStyle("downArrowSkin", downArrowIcon);
            setStyle("upArrowSkin", upArrowIcon);
        }
    }
}
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing the up arrow skin and down arrow skin on a NumericStepper control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/20/changing-the-up-arrow-skin-and-down-arrow-skin-on-a-numericstepper-control-in-flex/',contentID: 'post-636',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'downArrowSkin,upArrowSkin',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/05/20/changing-the-up-arrow-skin-and-down-arrow-skin-on-a-numericstepper-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limiting the number of characters a user can type into a NumericStepper control&#8217;s text input field in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/19/limiting-the-number-of-characters-a-user-can-type-into-a-numericstepper-controls-text-input-field-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/19/limiting-the-number-of-characters-a-user-can-type-into-a-numericstepper-controls-text-input-field-in-flex/#comments</comments>
		<pubDate>Tue, 20 May 2008 05:33:42 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[NumericStepper]]></category>
		<category><![CDATA[maxChars]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/19/limiting-the-number-of-characters-a-user-can-type-into-a-numericstepper-controls-text-input-field-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can limit the number of characters a user can type into a Flex NumericStepper control by setting the maxChars property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_maxChars_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/05/19/limiting-the-number-of-characters-a-user-can-type-into-a-numericstepper-controls-text-input-field-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:ApplicationControlBar dock="true"&#62; &#60;mx:Form styleName="plain"&#62; &#60;mx:FormItem label="maxChars:"&#62; &#60;mx:HSlider id="slider" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can limit the number of characters a user can type into a Flex NumericStepper control by setting the <code>maxChars</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-635"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_maxChars_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/19/limiting-the-number-of-characters-a-user-can-type-into-a-numericstepper-controls-text-input-field-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="maxChars:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="1"
                        maximum="3"
                        snapInterval="1"
                        tickInterval="1"
                        liveDragging="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:NumericStepper id="numericStepper"
            minimum="0"
            maximum="10000"
            stepSize="10"
            maxChars="{slider.value}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_maxChars_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/NumericStepper_maxChars_test/bin/main.html" width="100%" height="200"></iframe></p>
<p class="construction">Setting the <code>maxChars</code> property only limits the number of characters that can be typed. If your <code>maxChars</code> property was 2 and the NumericStepper control&#8217;s <code>maximum</code> property was 1000, the user could still enter numbers between 100 and 1000 using the Home/End keys, up/down arrows on the keyboard, or the up/down buttons in the NumericStepper control.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Limiting the number of characters a user can type into a NumericStepper control\&#039;s text input field in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/19/limiting-the-number-of-characters-a-user-can-type-into-a-numericstepper-controls-text-input-field-in-flex/',contentID: 'post-635',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'maxChars',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/05/19/limiting-the-number-of-characters-a-user-can-type-into-a-numericstepper-controls-text-input-field-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

