Numeric Field
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). |