DigitsAfterDecimal property (WinStudio scripts)

Applies To

IWSFormComponent interface

Definition

Sets or returns the number of decimal places in the value of a component.

Syntax

object.DigitsAfterDecimal

  Part   Description
object Required. A reference to a form component object.

Remarks

If this value is zero (0), the system does not set or round to a number of decimal places, but uses all decimal places entered.

This property corresponds to and can be used to set the Decimal Point Position value on the component property sheet.

Example

Sub Main()
   Dim myDecimal As Decimal
   ThisForm.Components("edit1").DigitsAfterDecimal = 4
   ThisForm.Components("edit1").TruncateDecimal = True
   myDecimal = ThisForm.Components("edit1").GetValueOfDecimal(0)
   Application.ShowMessage("Display value: " & myDecimal)
End Sub