Formatting fields at run time
Hello;
I am using D6 with RB7.02. I have an end user app that shows string fields
that represent numbers. I need to be able to allow the end user to format
these to show the result with padded zeros, decimal point placement, etc.
What would be the format string if I had a string value of 999.9 and I
wanted to display it as 000999.9000?
Thanks,
Steve Wagner
I am using D6 with RB7.02. I have an end user app that shows string fields
that represent numbers. I need to be able to allow the end user to format
these to show the result with padded zeros, decimal point placement, etc.
What would be the format string if I had a string value of 999.9 and I
wanted to display it as 000999.9000?
Thanks,
Steve Wagner
This discussion has been closed.
Comments
Depending on whether you would like a comma after the thousandths place you
will want to adjust the display format to show the following...
MyVariable.DisplayFormat := '#,000000.0000; -#,000000.0000'; {With commas}
MyVarialbe.DisplayFormat := '000000.0000; -000000.0000'; {Without commas}
Check out the Delphi help on DisplayFormat for more information.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com