Expand/Shrink

gSetFocus

Definition: include xpGUI.e

gSetFocus(gdx id)
-- or --
gdx id = gGetFocus()
Description: Set keyboard focus to a specified interface element, or find which control has said focus.

id: the control to set or that has keyboard focus
pwa/p2js: Supported.
Comments: Strange things may happen if attempted before anything has been displayed.

gGetFocus can sometimes return NULL under WinAPI, however that has not (yet) been observed under GTK.
Attempts to gSetFocus(NULL) are quietly ignored, for consistency, since GTK would never permit that.