OnLostFocus Property

Sets or gets the name of the macro or script to be run when the LostFocus event is triggered.

object.OnLostFocus = [string]

Where object is an object expression that evaluates to one of the controls in the Applies To list, and string is a string expression specifying the script or macro to run when the event is triggered.

Client support

   Newlook Smartclient only.

Use

The LostFocus event occurs when an object loses focus.

This property is useful if you wish to perform verification and validation as the user is leaving a control. Another use for this event procedure is enabling, disabling, hiding, and displaying other objects, in conjunction with an OnGotFocus macro. You can reverse or change conditions that you set up in the object’s OnGotFocus macro.

DATAGRID CONTROL:

In relation to the DataGrid control, the LostFocus event is triggered when the DataGrid object loses the focus. Use the EndEdit event to specify actions to run when the focus is removed from individual cells within the DataGrid.

BE AWARE THAT:

This property is not supported for most controls in Newlook Server and may lead to unintended behavior. Where possible, it is recommended that you avoid assigning logic to this property if your solution will be deployed to a Server environment.

See Also

OnGotFocus property | ActiveControl property

Applies To

Check box control

Combo box control

Command button control

Data control

DataGrid control

Date combo box control

Form object

Label control

ListBox control

ListView control

Menu button control

NumericCombo control

Option button control

PictureBox control

ProgressBar control

ScrollBar control (control deprecated in version 10.5)

SmartNav control

Tab control

Text box control

TrackBar control

TreeView control


© 2004-2021 looksoftware. All rights reserved.