Home Search

DriveWorks Pro 22
Decimal Places

Send Feedback

Decimal Places

The number of decimal places accepted can be set for the following control types:

  • Numeric Text Box Control.
  • Measurement Text Box Control
  • Spin Button

The Decimal Places property controls the number of decimal places shown in the control. If the value is set to a negative value, DriveWorks automatically determines the required number of decimal places.

Property Type: Dynamic

Default Value: -1

The default value of -1 will automatically set the required number of decimal places. For example if 10.002 is entered into the control it will be set to 3 decimal places.

Hierarchical Reference: ControlName.DecimalPlaces

To Change the Default Value

The default value of the property can be changed by any of the following methods:

  • Enter the required value directly into the enabled property field.
    1. Click in the property for the control to be changed.
    2. Type the required value directly into the property field.
  • Activate the rule builder.
    1. Click in the property for the control to be changed.
    2. Click the build button at the end of the property field to launch the rule builder .
    3. Enter the rule in the rule editor and click OK to apply.

Examples

Decimal Places Property Value (static)Result
4Will truncate the entered value to 4 decimal places.
Decimal Places Property Value (Dynamic)Result
IF( LengthReturn<25, 3, 2)

Will truncate the entered value to 3 decimal places, when the control Length is less than 25, otherwise 2 decimal places will be allowed.

Value can be controlled by a rule.