开发者

How to show numbers with comma separation in flex?

I can't seem to find anything that would let me to easily show a Number in a label, textinput, etc. with comma separation.

like in a label, show number 123456.78 as 123,456.78

[Bindable]
private var num:Number = 123456.78;

<mx:Label text={num} />

Obviously I could just create a function, but is there a more simple way?开发者_运维技巧

thanks


Check out ActionScript's NumberFormatter class. (mx.formatters.NumberFormatter)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜