focusable-child* ( gadget -- child/t )
Factor handbook > UI framework > Implementing new gadgets > UI gestures > Keyboard focus

Prev:request-focus ( gadget -- )
Next:gain-focus


Vocabulary
ui.gadgets

Inputs and outputs
gadgeta gadget
child/ta gadget or t


Word description
Outputs the child of the gadget which would prefer to receive keyboard focus, or t if the gadget itself should receive focus.

Examples
For example, if your gadget consists of an editor together with an output area whose contents react to changes in editor contents, then the focusable-child* method for your gadget class should return the editor, so that when the gadget is displayed in a window or passed to request-focus, the editor receives keyboard focus automatically.

Definition


Methods