|
|
Re: format value in property sheet [message #58799 is a reply to message #58797] |
Tue, 19 February 2008 11:05  |
Conor
Messages: 138 Registered: February 2007
|
Senior Member |
|
|
On Feb 19, 12:33 pm, David Fanning <n...@dfanning.com> wrote:
> bernat writes:
>> The only thing I want is to show my value in the property sheet.
>> I've a "problem" with that. I've a registered property as a FLOAT
>> value and the property sheet gets the value and shows in a widget this
>> float with 10 decimals.
>> If my value is 0.3 the property sheet shows 0.3000000190369...
>
>> Is it possible to change this ? If I get a value of 0.3, I want the
>> property sheet to show the same value property.
>
> I don't know about property sheets, but I find
> NUMBER_FORMATTER extremely handy for formatting
> numbers that will appear in text widgets:
>
> http://www.fanning.com/programs/number_formatter.pro
>
> This just looks to me like a bad case of using
> too many digits in a formatting statement when the
> number is converted to a string.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Oops! Page not found!
At least, that's what your website said when I clicked on your link
David...
|
|
|
Re: format value in property sheet [message #58800 is a reply to message #58799] |
Tue, 19 February 2008 09:33  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
bernat writes:
> The only thing I want is to show my value in the property sheet.
> I've a "problem" with that. I've a registered property as a FLOAT
> value and the property sheet gets the value and shows in a widget this
> float with 10 decimals.
> If my value is 0.3 the property sheet shows 0.3000000190369...
>
> Is it possible to change this ? If I get a value of 0.3, I want the
> property sheet to show the same value property.
I don't know about property sheets, but I find
NUMBER_FORMATTER extremely handy for formatting
numbers that will appear in text widgets:
http://www.fanning.com/programs/number_formatter.pro
This just looks to me like a bad case of using
too many digits in a formatting statement when the
number is converted to a string.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|