flexgeek

Archive for the ‘tips & tricks’ Category

banner3

Blog moved to http://blog.flexgeek.in

View the post here – http://blog.flexgeek.in/?p=29

banner3

Blog moved to http://blog.flexgeek.in

View the post here – http://blog.flexgeek.in/?p=24

banner3

Blog moved to http://blog.flexgeek.in

View the post here – http://blog.flexgeek.in/?p=18

banner3

Blog moved to http://blog.flexgeek.in

View the post here – http://blog.flexgeek.in/?p=10

Saw a post on flexcoders yesterday regarding some one wanting formatter support on NumericStepper. Played around with NumericStepper code base for around an hour yesterday night and this is what I got – <FormattedStepper>, an extended control from <mx:NumericStepper> with a formatter property which can be set to NumberFormatter or CurrencyFormatter. The control can be used as a regular NumericStepper too. I have attached a sample application and full source code also. This is version 0.0.1, may have a lot of bugs, but for starters, it works!

Sample Usage:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:xm="com.*" backgroundGradientColors="[#000000, #000000]"> <mx:CurrencyFormatter id="formatter" currencySymbol="$" alignSymbol="left"/>
<xm:FormattedStepper id="fs" formatter="{formatter}" minimum="1000" maximum="2000" stepSize="2"/>
</mx:Application>

Sample Application | Download Source (zip)