guides:programming:programmers_reference_manual:lostfocus_event

LOSTFOCUS event

Occurs when focus passes from a control to anywhere else.

bforward = LOSTFOCUS(ctrlentID, ctrlclassID, flag, focusID)

LOSTFOCUS accepts arguments for the following parameters.

ParameterDescription
ctrlentIDHas the format WindowName.ControlName, where WindowName is the identifier of the window that contains the affected control, and ControlName is the identifier of the control. Notice that a period separates the two values.
ctrlclassIDThe type of control that recognizes the event. Valid entries are:

Type - Description
CHECKBOX - Check box.
COMBOBOX - Combo box.
EDITBOX - Edit box.
EDITFIELD - Edit line.
EDITTABLE - Edit table.
LISTBOX - List box.
PUSHBUTTON - Push-button.
RADIOBUTTON - Radio button.
flagflag can have one of three values:

Value - Description
0 - Control has lost focus, and focus has moved to another application's window.
1 - Control has lost focus, and focus has moved to a different OpenInsight control.
2 - This LOSTFOCUS event was generated as a response to a MENU event.
focusIDThe next control in the active tab order. This parameter will contain the name of the control that receives focus after the LOSTFOCUS event.

True or false. If false, the program execution returns to the calling procedure. If true, the event processing goes to the next level.

A common mistake is returning 0 from LOSTFOCUS, not allowing the system event handler to process changes to data in bound controls. Always return 1 or use Forward_Event from LOSTFOCUS unless you want to suppress the system event handler.

  • guides/programming/programmers_reference_manual/lostfocus_event.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1