Example of Currency Formatter : CurrencyValidator « Data Model « Flex






Example of Currency Formatter

Example of Currency Formatter
    
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        
            [Bindable]
            private var dollarValue:Number=1234;
      
    </mx:Script>
    <mx:CurrencyFormatter id="Price" precision="2"
        rounding="none"
        decimalSeparatorTo="."
        thousandsSeparatorTo=","
        useThousandsSeparator="true"
        useNegativeSign="true"
        currencySymbol="$"
        alignSymbol="left"/>
    <mx:TextInput text="The price is {Price.format(dollarValue)}."/>
</mx:Application>

   
    
    
    
  








Related examples in the same category

1.Use CurrencyValidator to validate money valuesUse CurrencyValidator to validate money values
2.Using the CurrencyValidator to validate US currencyUsing the CurrencyValidator to validate US currency
3.Using the CurrencyValidator to validate European-formatted priceUsing the CurrencyValidator to validate European-formatted price
4.Using CurrencyValidator class to validate a currency value entered in U.S. dollars and in EurosUsing CurrencyValidator class to validate a currency value entered in U.S. dollars and in Euros
5.Use NumberValidator to validate and CurrencyFormatter to formatUse NumberValidator to validate and CurrencyFormatter to format
6.Currency formatter cell rendererCurrency formatter cell renderer
7.CurrencyFormatter precisionCurrencyFormatter precision
8.CurrencyFormatter decimalSeparatorToCurrencyFormatter decimalSeparatorTo
9.CurrencyFormatter thousandsSeparatorToCurrencyFormatter thousandsSeparatorTo
10.CurrencyFormatter useThousandsSeparatorCurrencyFormatter useThousandsSeparator
11.CurrencyFormatter useNegativeSignCurrencyFormatter useNegativeSign
12.Use CurrencyFormatter and NumberFormatter to format label for ChartUse CurrencyFormatter and NumberFormatter to format label for Chart
13.Using the CurrencyFormatter classUsing the CurrencyFormatter class