Name

SetFocus — Sets Focus to the specified widget

Synopsis

boolean SetFocus ( symbol widgetId );
 

Parameters

symbol widgetId

Return

boolean

Returns true on success (i.e. the widget accepted the focus).

Description

Sets the keyboard focus to the specified widget. Notice that not all widgets can accept the keyboard focus; this is limited to interactive widgets like PushButtton, InputField, SelectionBox etc. - manager widgets like VBox, HBox etc. will not accept the keyboard focus. They will not propagate the keyboard focus to some child widget that accepts the focus. Instead, an error message will be emitted into the log file.