ComponentOne True DBInput Pro 8.0
IntegerPlaces Property (TDBNumLite)

 

Reference> TDBNumLite Control> TDBNumLite Control Properties> IntegerPlaces Property (TDBNumLite)

IntegerPlaces Property (TDBNumLite)

Syntax

object.IntegerPlaces= integer

Read/Write at run time and design time.

Values

0 - 15 (0 is the default)

Remarks

The IntegerPlaces property is used in combination with the DecimalPlaces property to limit the digits that can be entered in the control. The valid ranges for the integral and the decimal places both put together must not exceed 0 to 15 digits. Changing the value of this property will automatically adjust the DecimalPlaces property to fit the leftover digits only if they exceed. For example, setting the IntegerPlaces to 10 will adjust the DecimalPlaces to 5 only if the original number of decimal digits were larger than 5.

When both the IntegerPlaces and the DecimalPlaces properties are set to 0, the valid range will allow any combination of the integral and the decimal number of digits, just so they are within 15 digits. For example entering 5 digits of integral places and pressing the decimal point character will preserve the left over 10 digits for decimal places.

If a floating-point value is read from a database or set at run time, and it contains more decimal digits than can be displayed, the control will maintain the precise value. However, only the number of digits specified with the DecimalPlaces property will be displayed in the control. If the integral digits exceed the specified number of digits, the value will be handled as an invalid value. For example:

TDBNumLite.IntegerPlaces = 5

TDBNumLite.DecimalPlaces = 3

TDBNumLite.Value = 123.12345

With the example above, the underlying value will hold - "123.123". Setting a value such as "123456.123" will cause an invalid error since the integral places exceed the specified number of digits.

Changing the value of either the IntegerPlaces or the DecimalPlaces property will cause the underlying value to set to Null. The user would need to initialize the value after specifying the number of digits.

The value of the integral and the decimal places can be referenced with the Integer and the Decimal properties.

See Also

DecimalPlaces Property (TDBNumLite)

Decimal Property (TDBNumLite)

Integer Property (TDBNumLite)

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback