Package: gtk
Class gtk:message-dialog
Superclassesgtk:dialog, gtk:window, gtk:bin, gtk:container, gtk:widget, gtk:buildable, gobject:object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct SlotsDetails The gtk:message-dialog widget presents a dialog with some message
text.
It is simply a convenience widget. You could construct the equivalent of a message dialog from a gtk:dialog widget without too much effort, but the gtk:message-dialog widget saves typing. ![]() Figure: GtkMessageDialog One difference from the gtk:dialog widget is that the message dialog sets the skip-taskbar-hint property to true, so that the message dialog is hidden from the taskbar by default. The easiest way to do a modal message dialog is to use the gtk:dialog-run function, though you can also pass in the :modal flag of type gtk:dialog-flags flags, the gtk:dialog-run function automatically makes the message dialog modal and waits for the user to respond to it. The gtk:dialog-run function returns when any message dialog button is clicked. Examples
(let ((dialog (gtk:message-dialog-new main-window
'(:destroy-with-parent)
:error
:close
"Error loading file ~s"
filename)))
(gtk:dialog-run dialog)
(gtk:widget-destroy dialog))
You might do a non-modal message dialog as follows.
(let ((dialog (gtk:message-dialog-new main-window
'(:destroy-with-parent)
:error
:close
"Error loading file ~s"
filename)))
;; Destroy the dialog when the user responds to it
(g:signal-connect dialog "response"
(lambda (dialog response-id)
(declare (ignore response-id))
(gtk:widget-destroy dialog)))
... ) GtkMessageDialog as GtkBuildableStyle Property Detailsmessage-border The message-border style property of type :int (Read) The width of border around the label and image in the message dialog. Allowed values: >= 0 Default value: 12 | Returned bySlot Access FunctionsInherited Slot Access FunctionsSee also |
2025-06-24
