IupSetFocus

Definition: include pGUI.e

IupSetFocus(Ihandle ih)
Description: Sets the interface element that will receive the keyboard focus, i.e., the element that will receive keyboard events.

ih: identifier of the interface element that will receive the keyboard focus. The only elements that can have the keyboard focus are mapped, active, and visible ones, other elements are ignored.
Notes: The value returned by IupGetFocus is updated only when the main loop regains control and the element actually receive the focus. So were you to call IupGetFocus right after IupSetFocus, the return value would be different (to that just set). You could call IupFlush between the two calls to obtain the updated value.
See Also: IupGetFocus