Difference between revisions of "Documentation/DevGuide/Basic/Numeric Field"
OOoWikiBot (Talk | contribs) m (Robot: Changing Category:Documentation/Developers Guide/Basic and Dialogs) |
OOoWikiBot (Talk | contribs) m (FINAL VERSION FOR L10N) |
||
Line 6: | Line 6: | ||
|NextPage=Documentation/DevGuide/Basic/Currency Field | |NextPage=Documentation/DevGuide/Basic/Currency Field | ||
}} | }} | ||
− | {{DISPLAYTITLE:Numeric Field}} | + | {{Documentation/DevGuideLanguages|Documentation/DevGuide/Basic/{{SUBPAGENAME}}}} |
+ | {{DISPLAYTITLE:Numeric Field}} | ||
It is recommended to use the numeric field control <idl>com.sun.star.awt.UnoControlNumericField</idl> if the user input is limited to numeric values. The numeric value is controlled by the <code>Value</code> property, which is of type <code>Double</code>. A minimum and maximum value for user input is defined by the <code>ValueMin</code> and the <code>ValueMax</code> property. The decimal accuracy of the numeric value is specified by the <code>DecimalAccuracy</code> property, for example, a value of 6 corresponds to 6 decimal places. If the <code>ShowThousandsSeparator</code> property is set to <code>True</code>, a thousands separator is displayed. The numeric field also has a built-in spin button, enabled by the <code>Spin</code> property. The spin button is used to increment and decrement the displayed numeric value by clicking with the mouse, whereas the step is set by the <code>ValueStep</code> property. | It is recommended to use the numeric field control <idl>com.sun.star.awt.UnoControlNumericField</idl> if the user input is limited to numeric values. The numeric value is controlled by the <code>Value</code> property, which is of type <code>Double</code>. A minimum and maximum value for user input is defined by the <code>ValueMin</code> and the <code>ValueMax</code> property. The decimal accuracy of the numeric value is specified by the <code>DecimalAccuracy</code> property, for example, a value of 6 corresponds to 6 decimal places. If the <code>ShowThousandsSeparator</code> property is set to <code>True</code>, a thousands separator is displayed. The numeric field also has a built-in spin button, enabled by the <code>Spin</code> property. The spin button is used to increment and decrement the displayed numeric value by clicking with the mouse, whereas the step is set by the <code>ValueStep</code> property. | ||
Revision as of 12:38, 15 May 2009
It is recommended to use the numeric field control com.sun.star.awt.UnoControlNumericField if the user input is limited to numeric values. The numeric value is controlled by the Value
property, which is of type Double
. A minimum and maximum value for user input is defined by the ValueMin
and the ValueMax
property. The decimal accuracy of the numeric value is specified by the DecimalAccuracy
property, for example, a value of 6 corresponds to 6 decimal places. If the ShowThousandsSeparator
property is set to True
, a thousands separator is displayed. The numeric field also has a built-in spin button, enabled by the Spin
property. The spin button is used to increment and decrement the displayed numeric value by clicking with the mouse, whereas the step is set by the ValueStep
property.
oNumericFieldModel = oDialog.Model.NumericField1 oNumericFieldModel.Value = 25.40 oNumericFieldModel.DecimalAccuracy = 2
Content on this page is licensed under the Public Documentation License (PDL). |