grab_focus
Description:
[ HasEmitter ]
public virtual signal void grab_focus ()
public virtual signal void grab_focus ()
Causes this to have the keyboard focus for the Window it's inside.
this must be a focusable widget, such as a Entry; something like Frame won’t work.
More precisely, it must have the gtk_can_focus flag set. Use set_can_focus to modify that flag.
The widget also needs to be realized and mapped. This is indicated by the related signals. Grabbing the focus immediately after creating the widget will likely fail and cause critical warnings.
Parameters:
widget |
a Widget |