Control - Focus Property

Focus tells whether the component has focus

Member of Control (PRIM_CTRL)

Data Type - Boolean

Details

Focus will return True if the control is the focus control for the application.
 
The focus control is the one that will react to keyboard input.
 
Focus is typically managed automatically by the LANSA runtime.  When a control is clicked or tab is used to navigate to a control, that control becomes the focus control.
 
If there is already a focus control, it will fire its LostFocus event before the new focus control fires its own GotFocus event.
 
When showing a form or page for the first time, the control with a TabPosition of 1 will default to the focus.

Example

Setting focus to a specific control during initialization.
Evtroutine Handling(#Com_owner.Initialize)
   #CustomerNumber.SetFocus
Endroutine

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2