Control Focus Gained/Lost Event

Description

The user caused the control identified in the id field of the event template to gain or lose focus.

-  The primary way to cause a control to gain focus is to click it with the mouse or press the Tab key until the focus window moves to the control.

-  The primary way to cause a control to lose focus is to click another control with the mouse or press the Tab key until the focus window moves to another control.

Mandatory/Optional

Optional.

Event Mask Bit

$00800000$

Event Template

context:u(2),code:c(1),id:u(2),flags:u(1),x:u(2),y:u(2)

Field

Description

context

Window containing the control that gained or lost focus

code

f

id

ID of the control that gained or lost focus

flags

$00$ Focus lost
$01$ Focus gained

x

0 = Permanent
1 = Temporary (BBj 12.0 and higher)

y

0

The temporary flag (x = 1) is reported if the control loses focus as a side effect of something happening to the window (e.g. window minimized or window lost focus). Validation routines based on loss of focus can benefit from looking for this flag -- if a loss of focus is temporary, validation logic can be bypassed.

See Also

BBjGainedFocusEvent

BBjLostFocusEvent