Package: gtk

Function gtk:window-default-widget

Lambda List

gtk:window-default-widget (window)

Syntax

(gtk:window-default-widget window) => widget
(setf (gtk:window-default-widget window) widget)

Arguments

window -- a gtk:window widget
widget -- a gtk:widget object to be the default, or nil to unset the default widget for the toplevel

Details

The gtk:window-default-widget function returns the default widget for the window. The (setf gtk:window-default-widget) function sets or unsets the default widget.

The default widget is the widget that is activated when the user presses the Enter key in a dialog for example. When setting, rather than unsetting, the default widget it is generally easier to call the gtk:widget-grab-focus function on the widget. Before making a widget the default widget, you must call the gtk:widget-can-default function on the widget you would like to make the default.

Notes

The C library has the gtk_window_set_default () function, which is implemented as the (setf gtk:window-default-widget) function in the Lisp API.
 

See also

#2024-3-20