|Navigation: Language Reference > 13 - Built-in Functions >====== FOCUS (return control with focus) ======|
The FOCUS procedure returns the field number of the control which has received the last EVENT:SELECTED event among the other controls (not menu items) of the active window.
Positive field numbers are assigned by the compiler to all WINDOW controls, in the order their declarations occur in the WINDOW structure. Negative field numbers are assigned to all APPLICATION controls. In executable code statements, field numbers are usually represented by field equate labels–the label of the USE variable preceded by a question mark (?FieldName).
|Return Data Type:||SIGNED|
CASE FOCUS() !Control edit control
OF ?Control1 !Field number 1
OF ?Control2 !Field number 2
OF ?Control3 !Field number 3