ComponentOne True DBInput Pro 8.0
MaxValue Property (TDBText)

 

Reference> TDBText Control> TDBText Control Properties> MaxValue Property (TDBText)

MaxValue Property (TDBText)

Sets/returns the maximum acceptable value.

Syntax

control.MaxValue= value

Read/Write at run time and design time.

Values

99999 is the default

Remarks

The MaxValue property is used in combination with the MinValue property to determine whether the specified value is within the appropriate range. The value set in the MaxValue property cannot be smaller than the value set in the MinValue 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.

The number of digits set in the MaxValue and MinValue properties should not exceed fifteen digits or the digits specified in the IntegerPlaces and the DecimalPlaces properties. If it exceeds, the maximum limit value of the Format property will be applied instead. For example, when the MaxValue is 999.0 and the MinValue is -999.0, if an input mask such as "##.#" is applied to the Format property, the maximum and the minimum values will be automatically limited between 99.9 and -99.9.

Generally, the control allows you entering any numeric values that are within the number of digits specified in the Format property, both positive and negative regardless to the MaxValue and the MinValue properties. There will be no range checking for the entered value until you move the focus away. As soon as the control loses the focus, the InvalidRange event will be invoked notifying the user that the entered value was out of range.

When modifying values by changing the Value or the Text property, which are not within the proper range, this will cause a run-time invalid range error to occur. No events are fired in this case.

When binding the control to a data source, if the retrieved value exceeds the specified range, the DBError event will be fire, returning an error code - 1.

The Value property will be automatically set to Null when the current value does not fall within the maximum and minimum range.

If you apply Null to this property, a trappable error will occur.

See Also

MinValue Property (TDBNumber)

Format Property (TDBNumber)

Text Property (TDBNumber)

Text Property (TDBNumLite)

Value Property (TDBNumber)

Value Property (TDBNumLite)

InvalidRange Event (TDBNumLite)

DBError Event (TDBText)

 

 


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

Product Support Forum  |  Documentation Feedback