?
Solved

How to format a textfield with currency formatter in Flex?

Posted on 2011-03-06
2
Medium Priority
?
921 Views
Last Modified: 2012-05-11
Hello,

i know how i can format a cell in a datagrid with a currency formatter. But i don´t know how to format a textfield.

e.g. the output of the textfield is 768212 and it has to be $ 768.212

Thank you!
0
Comment
Question by:druplash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
ChristoferDutz earned 2000 total points
ID: 35054697
This is how I use it in one of my applications (Ok it's a DateFormatter, but it's actually usable the same way the CurrencyFormatte is used:
<fx:Declarations>
    <mx:DateFormatter id="dt"
                          formatString="{ResourceManager.getInstance().getString('formatting', 'DATE_FORMAT')}" />
</fx:Declarations>

...

<s:Label text="{dt.format(hostComponent.hiObject.validToDate)}" toolTip="{hostComponent.hiObject.validToDate}" alpha.disabled="0.5"/>

Open in new window


I thiAnother site using a different approach woud be this:
http://blog.flexexamples.com/2007/08/25/using-the-currencyvalidator-and-currencyformatter-classes-to-validate-and-format-numbers/

0
 

Author Closing Comment

by:druplash
ID: 35072122
Thank´s! Great work!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question