void set_default(GtkWidget default_widget);

Sets default_widget as the default widget for the window. The default widget is the widget that will receive focus when the window receives focus.

If null is passed as default_widget, the default widget will be unset.

It is normally easier to call grab_focus() on the widget that you want to make the default rather than using set_default() .

Before you can set a widget as the default you must set the Gtk::CAN_DEFAULT flag for the widget by calling set_flags.

See also: activate_default() grab_focus() set_flags