Forum und email

GtkWindow::set_focus

void set_focus(GtkWidget focus);

Sets the focus widget for the window to focus. If focus is null, the focus widget for the window will be unset.

If focus is not a focusable widget (ex. GtkLabel), a Gtk-CRITICAL error will be thrown.

The focus widget is the widget that will be given keyboard focus when the window receives keyboard focus.

Виж също: activate_focus() , get_focus() , grab_focus()