WinStudio
IWSFormComponent interface
Sets or returns a Boolean value specifying whether the value of a component is rounded automatically to a set number of decimal places.
object.TruncateDecimal
Part |
Description |
object | Required. A component object. |
object.TruncateDecimal = Boolean
Part |
Description |
object | Required. A component object. |
Boolean | Required. Determines whether decimal rounding is
enabled or disabled:
|
In the Get syntax, a return value of:
Rounds decimal values to the number of decimal places specified by DigitsAfterDecimal. Corresponds to and can be used to programmatically set the Round property on the component property sheet.
Numbers greater than 5 are rounded up.
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