ComponentOne True DBInput Pro 8.0
Value Property (TDBNumber)

 

Value Property (TDBNumber)

This property sets/returns the underlying value for the control.

Syntax

TDBNumber.Value= variant

Read/Write at run time and design time.

Values

-999999999999999 - 999999999999999 (0 is the default)

Remarks

The number of digits set in the Value property should not exceed fifteen digits, or the number of digits specified in the Format property. Valid ranges are from -999999999999999 to 999999999999999, a maximum total of fifteen digits including both the integer and the decimal places. The integer digit count will vary depending on the number of decimal digits being used.

When modifying numeric values by changing the Value or the Text property, which are not within the proper range, this will cause an invalid value range error to occur without any events firing. If an invalid value is set into these properties, an invalid value error will occur.

When the Value property is modified, the Text property will also reflect the changes.

The Format and the DisplayFormat properties will not effect the underlying value although the number of the digits specified in the formats differ from each other. For example:

TDBNumber.Format = "###,###.###"

TDBNumber.DisplayFormat = "##.#"

TDBNumber.Value = 123456.789

With the example above, the control displays "123456.7" when moving the focus to a different control, but the underlying value will be still set as "123456.789".

This is the default property of the TDBNumber control.

If a floating-point value is read from a database or set at run time, and contains more decimal digits than can be displayed, the control will maintain the precise value. However, only the number of digits specified with the input mask 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.

Null value is not a valid value that can be converted to a numeric, but can be used as a Variant subtype, indicating that a variable or a property contains no valid data.

The Value property will be automatically set to Null when resetting the maximum or the minimum range out the current value using the MaxValue and the MinValue properties or when modifying the input format.

See Also

Text Property (TDBNumber)

Format Property (TDBNumber)

DisplayFormat Property (TDBNumber)

ValueIsNull Property (TDBNumber)

MaxValue Property (TDBNumber)

MinValue Property (TDBNumber)

 

 


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

Product Support Forum  |  Documentation Feedback