ComponentOne True DBInput Pro 8.0
CloseUp Event (TDBText)

 

Reference> TDBText Control> TDBText Control Events> CloseUp Event (TDBText)

CloseUp Event (TDBText)

The CloseUp event is fired just before the object is closed. If the cancel parameter is set to False (default), the new value from the object will be applied to the editing area as usual. However, if set to True, the new value will be canceled and not be applied. You can also control the value by changing the value argument.

Syntax

control_CloseUp (Cancel As Boolean, Value As Date, Escape As Boolean)

Arguments

cancel is a Boolean that determines whether to cancel the new value (date, value, text) applied from the drop-down object (calendar, calculator, text entry window).

The possible values of cancel are as follows:

True - Cancel the new value applied from the object.

False - Apply the new value from the object to the edit area. (Default)

For the Calendar, value is a date that sets/returns the new date applied from the calendar.

For the Calculator, value is a double that Sets/returns the new value applied from the calculator.

For the Text window, value returns or sets the new text applied from the drop-down window.

escape is a Boolean that provides information on how the drop-down object was closed.

The possible values of escape are as follows:

True - The user pressed the Esc key or moved focus to a different control while the drop-down object was still displayed.

False - The user pressed the Enter key or clicked the mouse to confirm data entry.

Remarks

Note that a Null value cannot be set using the value argument; you must directly set the control's Value property to Null.

If a floating-point value is applied from the calculator 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 input mask will be displayed in the control. If the integral digits exceed the specified number of digits or overflow values such as "E", these values will be handled as an invalid value, firing the InvalidInput event and leaving the old data displayed in the control.

Please avoid popping up a message box in this event. If you do, you may experience unexpected results.

This event will not be fired when popping up a custom calendar.

See Also

MouseEnter Event (TDBText)

 

 


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

Product Support Forum  |  Documentation Feedback