ComponentOne True DBInput Pro 8.0
MaxTime Property (TDBTime)

 

Reference> TDBTime Control> TDBTime Control Properties> MaxTime Property (TDBTime)

MaxTime Property (TDBTime)

Sets/returns the maximum time range.

Syntax

TDBTime.MaxTime= variant

Read/Write at run time and design time.

Values

00:00:00 - 23:59:59 (23:59:59 is the default)

Remarks

The MaxTime property is used in combination with the MinTime property to determine whether the specified time is within the proper range. The value set in the MaxTime property cannot be smaller than the time set in the MinTime property.

Generally, the control allows you to enter any valid time while the control has the focus, including time that exceeds the MaxTime and MinTime properties. There will be no range checking for the entered time. But as soon as you attempt to move the focus away, the InvalidRange event will be fired, notifying the user that the entered time was out of range.

When modifying time values by changing the Value, Number or the Text properties, which are not within the proper range, this will cause an invalid value range error to occur. No events are fired, in this case.

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

TDBTime.MinTime = "9:00:00"

TDBTime.MaxTime = "18:00:00"

In the above example, time that is larger or smaller than 9:00:00-18:00:00 will be treated as an error.

If the underlying value contains a Null, the range checking process will be ignored.

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

TDBTime.Value = "6:00:00"

TDBTime.MinTime = "12:00:00"

TDBTime.MaxTime = "23:00:00"

See Also

MinTime Property (TDBTime)

Value Property (TDBTime)

Number Property (TDBTime)

Text Property (TDBTime)

InvalidRange Event (TDBTime)

DBError Event (TDBTime)

 

 


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

Product Support Forum  |  Documentation Feedback