Gets or sets the numeric display format string.
object.NumericFormat = [string]
Where object is an object expression that evaluates to one of the controls in the Applies To list, and string is a string expression specifying the numeric format used to display the contents of the control.
Newlook Smartclient
Newlook Server
This property is used to specify how the contents of a numeric control will be displayed in the GUI. Setting the NumericFormat property will not change the underlying value of the control.
If a control has a numeric format specified and there is also a format specified for the form then the format specified within the control will take precedence.
The following table shows the special characters that may be used within the DisplayFormat expression.
A format expression may have one, two, three or four sections, each delimited by a semi-colon (;) character. The following explains how the use of each section works:
|
Formatting Character |
Description |
|
Empty string |
Displays the number without any formatting. |
|
0 |
Digit placeholder. |
|
# |
Digit placeholder. |
|
. |
Decimalplaceholder. |
|
, |
Thousandseparator. |
|
% |
Percentageplaceholder. |
|
E- E+ e- e+ |
Scientificnotation. |
|
\ |
Literalcharacters. |
|
“ABC” |
Stringliterals. |
|
Any others |
All other characters (not listed above) are simply inserted one-for-one as literal characters into the final resulting string. |
|
DisplayFormat String |
Value |
Displayed Text |
|
Empty String ("") |
2 |
2 |
|
Empty String ("") |
-2 |
-2 |
|
Empty String ("") |
.2 |
.2 |
|
0 |
2 |
2 |
|
0 |
-2 |
-2 |
|
0 |
.2 |
0 |
|
0.00 |
2 |
2.00 |
|
0.00 |
-2 |
-2.00 |
|
0.00 |
.2379 |
0.24 |
|
#,##0 |
2,000 |
2,000 |
|
#,##0 |
-2,000 |
-2,000 |
|
#,##0 |
.2379 |
0 |
|
AU$#,##0.00;(AU$#,##0.00) |
2 |
AU$2.00 |
|
AU$#,##0.00;(AU$#,##0.00) |
-2 |
(AU$2.00) |
|
AU$#,##0.00;(AU$#,##0.00) |
0.2379 |
AU$0.24 |
|
00.00.00 |
23 |
(Error) |
|
0% |
2 |
200% |
|
0% |
-2 |
-200% |
|
0% |
0.2379 |
24% |
|
##%0% |
.235 |
(Error) |
|
0.00E+00 |
2 |
2.00E+00 |
|
0.00E+00 |
-2 |
-2.00E+00 |
|
0.00E+00 |
0.2379 |
2.37E-01 |
|
0.00E-00 |
2 |
2.00E00 |
|
0.00E-00 |
-2 |
-2.00E00 |
|
0.00E-00 |
0.2379 |
2.37E-01 |
|
\#000 |
2 |
#003 |
|
"#E"000 |
2 |
#E002 |
|
00;(00);nil;unknown |
0 |
nil |
|
00;(00);nil;unknown |
|
unknown |
|
Min 000mm |
23 |
Min 023mm |
DecimalSymbol property | DigitGroupingSymbol property | DateFormat property
NumericCombo control, Form object