开发者

How to show numbers with comma separation in flex?

开发者 https://www.devze.com 2022-12-25 07:06 出处:网络
I can\'t seem to find anything that would let me to easily show a Number in a label, textinput, etc. with comma separation.

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

精彩评论

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

关注公众号