Documents

NextGrid & NextDBGrid

NextGrid

NextDBGrid

NextInspector

NextSheet

NextCollection

Misc

Labs

NextGrid .NET

Numeric FormatMask

Related Articles:

Info
  • Skill:
  • Version: 1.0.0
  • Author: Bojan Nikolic
  • Created: 2008-04-29
  • Updated: 2008-04-29
At many places our components having FormatMask property. When this property is used to format number, we are using standard Delphi/CBuilder FormatFloat function.

Since we ofter have requeststs abot this functions, please read bellow for full examples about using this property.

Example:

FormatMask := '#,##0.00';


for number 12345 will return

12,345.00


Full llist:

Format string-		1234		-1234		0.5		0
			1234		-1234		0.5		0
0			1234		-1234		1		0
0.00 			1234.00		-1234.00	0.50		0.00
#.##  			1234		-1234		.5	
#,##0.00		1,234.00	-1,234.00	0.50		0.00
#,##0.00;(#,##0.00)	1,234.00	(1,234.00)	0.50		0.00
#,##0.00;;Zero 		1,234.00	-1,234.00	0.50		Zero
0.000E 00   		1.234E 03	-1.234E 03	5.000E-01	0.000E 00
#.###E-0  		1.234E3		-1.234E3	5E-1		0E0


For more details please look for FormatFloat function inside Delphi help.

Was This Article Useful?

Only constructive comments, code contributions... will be publishes. Questions, non-official discussion will not be published.