#GtkInfoBar is a widget that can be used to show messages to
the user without showing a dialog. It is often temporarily shown
at the top or bottom of a document. In contrast to #GtkDialog, which
has a action area at the bottom, #GtkInfoBar has an action area
at the side.
Similar to #GtkMessageDialog, the contents of a #GtkInfoBar can by
classified as error message, warning, informational message, etc,
by using gtk.info_bar.InfoBar.setMessageType. GTK+ may use the message type
to determine how the message is displayed.
The GtkInfoBar implementation of the GtkBuildable interface exposes
the content area and action area as internal children with the names
“content_area” and “action_area”.
GtkInfoBar supports a custom <action-widgets> element, which can contain
multiple <action-widget> elements. The “response” attribute specifies a
numeric response, and the content of the element is the id of widget
(which should be a child of the dialogs @action_area).
CSS nodes
GtkInfoBar has a single CSS node with name infobar. The node may get
one of the style classes .info, .warning, .error or .question, depending
on the message type.
#GtkInfoBar is a widget that can be used to show messages to the user without showing a dialog. It is often temporarily shown at the top or bottom of a document. In contrast to #GtkDialog, which has a action area at the bottom, #GtkInfoBar has an action area at the side.
The API of #GtkInfoBar is very similar to #GtkDialog, allowing you to add buttons to the action area with gtk.info_bar.InfoBar.addButton or gtk.info_bar.InfoBar.newWithButtons. The sensitivity of action widgets can be controlled with gtk.info_bar.InfoBar.setResponseSensitive. To add widgets to the main content area of a #GtkInfoBar, use gtk.info_bar.InfoBar.getContentArea and add your widgets to the container.
Similar to #GtkMessageDialog, the contents of a #GtkInfoBar can by classified as error message, warning, informational message, etc, by using gtk.info_bar.InfoBar.setMessageType. GTK+ may use the message type to determine how the message is displayed.
A simple example for using a #GtkInfoBar:
GtkInfoBar as GtkBuildable
The GtkInfoBar implementation of the GtkBuildable interface exposes the content area and action area as internal children with the names “content_area” and “action_area”.
GtkInfoBar supports a custom <action-widgets> element, which can contain multiple <action-widget> elements. The “response” attribute specifies a numeric response, and the content of the element is the id of widget (which should be a child of the dialogs @action_area).
CSS nodes
GtkInfoBar has a single CSS node with name infobar. The node may get one of the style classes .info, .warning, .error or .question, depending on the message type.