- 积分
- 1
- 注册时间
- 2009-12-3
- 仿真币
-
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2012-2-12 22:14:06
|
显示全部楼层
来自 江苏南京
本帖最后由 benbenmoon 于 2012-2-12 22:15 编辑
morningsun613 发表于 2012-2-12 21:33
请教版主 如何控制view中显示的小数的位数啊?
之前我也想过这个问题 不处理一下太丑了 刚才找到函数在群里说了的。。。
用的那个stringfmt( g, pre, wid )函数把_min和_max改一下 比如改成 gnname=stringfmt(_min,3,1)+'-'+stringfmt(_max,3,1)
试了一下 pre可以理解为有效数字的位数 但是没高清楚那个wid是什么意思 下面是stringfmt函数的解释
stringfmt( g, pre, wid )
converts to a string. If g is already of type string, then the
function simply returns g as its value. If g is int, then a
character string will be returned with width wid. If g is
float, then a character string will be returned with width
wid and precision pre.
|
|