Hello , flexcoders

  I was stumbled upon that all my fractional numbers like 0.25, 0.45,
0.65, etc are displayed after formatting with <mx:CurrencyFormatter>
like this:

$.25, $.45, $.65

What I want my numbers to be displayed is:

$0.25, $0.45, $.65.

  I cannot find a simple and reliable way to specify the MUST inclusion
of 0 number when using standard <mx:CurrencyFormatter>. Playing with
currencySymbol="$0" attribute is not a reliable solution, IMHO.

Should I resort to writing my own formatter?


-----START of sample code copied from Flex 1.5 help section 
(http://tinyurl.com/jyckh) --

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";>
<!-- Declare a CurrencyFormatter and define parameters. -->
   <mx:CurrencyFormatter id="Price" precision="2"
      rounding="none"
      decimalSeparatorTo="."
      thousandsSeparatorTo=","
      useThousandsSeparator="true"
      useNegativeSign="true"
      currencySymbol="$0"
      alignSymbol="left" />
   <mx:Script>
      <![CDATA[
         var todaysPrice=0.25;
      ]]>
   </mx:Script>

   <!-- Trigger the formatter while populating a string with data. -->
   <mx:TextInput text="Today's price is {Price.format(todaysPrice)}." /> 

</mx:Application>   

---END of sample code copied from Flex 1.5 help section ------------------

-- 
Best regards,
 Andriy                          mailto:[EMAIL PROTECTED]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to