<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Setting the text alignment in a NumericStepper control in Flex</title>
	<atom:link href="http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Luis Borlido</title>
		<link>http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/comment-page-1/#comment-9592</link>
		<dc:creator>Luis Borlido</dc:creator>
		<pubDate>Wed, 14 Sep 2011 14:47:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/#comment-9592</guid>
		<description>Hi!

Is it possible to align vertically the text inside a halo numeric stepper?
I&#039;m using a numeric stepper as an item editor in a datagrid.

Thanks!!</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>Is it possible to align vertically the text inside a halo numeric stepper?<br />
I&#8217;m using a numeric stepper as an item editor in a datagrid.</p>
<p>Thanks!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark W</title>
		<link>http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/comment-page-1/#comment-9153</link>
		<dc:creator>Mark W</dc:creator>
		<pubDate>Fri, 22 Apr 2011 14:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/#comment-9153</guid>
		<description>I have made my buttons larger so the stepper can be used  on a 19&quot; touchscreen display. So I&#039;m looking for a way to set the VerticalAlign to middle.  I&#039;m trying to keep the text size consistant on the form so increasing the fontsize is not an option.

Any ideas would be greatly appreciated.

Thanks!</description>
		<content:encoded><![CDATA[<p>I have made my buttons larger so the stepper can be used  on a 19&#8243; touchscreen display. So I&#8217;m looking for a way to set the VerticalAlign to middle.  I&#8217;m trying to keep the text size consistant on the form so increasing the fontsize is not an option.</p>
<p>Any ideas would be greatly appreciated.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hydflexer</title>
		<link>http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/comment-page-1/#comment-7496</link>
		<dc:creator>hydflexer</dc:creator>
		<pubDate>Wed, 14 Apr 2010 07:43:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/#comment-7496</guid>
		<description>ThankYou, this is what i want</description>
		<content:encoded><![CDATA[<p>ThankYou, this is what i want</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: obesga</title>
		<link>http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/comment-page-1/#comment-4688</link>
		<dc:creator>obesga</dc:creator>
		<pubDate>Wed, 22 Jul 2009 13:50:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/#comment-4688</guid>
		<description>You saved me the day !</description>
		<content:encoded><![CDATA[<p>You saved me the day !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: akshay</title>
		<link>http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/comment-page-1/#comment-3278</link>
		<dc:creator>akshay</dc:creator>
		<pubDate>Tue, 20 May 2008 05:53:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/#comment-3278</guid>
		<description>its of loads of help</description>
		<content:encoded><![CDATA[<p>its of loads of help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vigil</title>
		<link>http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/comment-page-1/#comment-3275</link>
		<dc:creator>vigil</dc:creator>
		<pubDate>Mon, 19 May 2008 16:16:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/#comment-3275</guid>
		<description>Thank you very much Peter. It&#039;s perfect! :)</description>
		<content:encoded><![CDATA[<p>Thank you very much Peter. It&#8217;s perfect! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/comment-page-1/#comment-3276</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Mon, 19 May 2008 14:37:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/#comment-3276</guid>
		<description>&lt;a href=&quot;http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/#comment-12772&quot; rel=&quot;nofollow&quot;&gt;vigil&lt;/a&gt;,

This should do it:
&lt;pre class=&quot;code&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;

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

            private var nsMask:String = &quot;000&quot;;

            private function formatNumber(evt:Event):void {
                var value:String = numericStepper.value.toString();
                value = (nsMask + value).substr(-nsMask.length);
                numericStepper.mx_internal::inputField.text = value;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:NumericStepper id=&quot;numericStepper&quot;
            minimum=&quot;0&quot;
            maximum=&quot;255&quot;
            value=&quot;3&quot;
            width=&quot;100&quot;
            textAlign=&quot;center&quot;
            creationComplete=&quot;formatNumber(event);&quot;
            change=&quot;formatNumber(event);&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p><a href="http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/#comment-12772" rel="nofollow">vigil</a>,</p>
<p>This should do it:</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&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 var nsMask:String = "000";

            private function formatNumber(evt:Event):void {
                var value:String = numericStepper.value.toString();
                value = (nsMask + value).substr(-nsMask.length);
                numericStepper.mx_internal::inputField.text = value;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:NumericStepper id="numericStepper"
            minimum="0"
            maximum="255"
            value="3"
            width="100"
            textAlign="center"
            creationComplete="formatNumber(event);"
            change="formatNumber(event);" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vigil</title>
		<link>http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/comment-page-1/#comment-3277</link>
		<dc:creator>vigil</dc:creator>
		<pubDate>Mon, 19 May 2008 13:33:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/18/setting-the-text-alignment-in-a-numericstepper-control-in-flex/#comment-3277</guid>
		<description>There is an easy way to add leading zeros to the numeric stepper in mxml? [ie. 001, insted of 1]</description>
		<content:encoded><![CDATA[<p>There is an easy way to add leading zeros to the numeric stepper in mxml? [ie. 001, insted of 1]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

