gtk.InfoBar
class gtk.InfoBar(gtk.HBox): |
+--GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Box +-- gtk.HBox +-- gtk.InfoBar
gtk.InfoBar ()
Returns : | a new gtk.InfoBar object |
This constructor is available in PyGTK 2.18 and above.
Creates a new gtk.InfoBar
object.
def get_action_area()
Returns : | the action area |
This method is available in PyGTK 2.18 and above.
The get_action_area
() method returns the action area of info_bar
.
def get_content_area()
Returns : | the content area |
This method is available in PyGTK 2.18 and above.
The get_content_area
() method returns the content area of info_bar
.
def add_action_widget(child
, response_id
)
| an activatable widget |
| response ID for child |
This method is available in PyGTK 2.18 and above.
Add an activatable widget to the action area of a gtk.InfoBar
,
connecting a signal handler that will emit the gtk.InfoBar
::response
signal on the message area when the widget is activated. The widget
is appended to the end of the message areas action area.
def add_button(button_text
, response_id
)
| text of button, or stock ID |
| response ID for the button |
Returns : | the button widget that was added |
This method is available in PyGTK 2.18 and above.
Adds a button with the given text (or a stock button, if button_text is a stock ID) and sets things up so that clicking the button will emit the "response" signal with the given response_id. The button is appended to the end of the info bars's action area. The button widget is returned, but usually you don't need it.
def add_buttons(first_button_text
)
| button text or stock ID |
This method is available in PyGTK 2.18 and above.
Adds more buttons, same as calling gtk.InfoBar.add_button
repeatedly. The variable argument list should be NULL
-terminated
as with gtk_info_bar_new_with_buttons()
. Each button must have both
text and response ID.
def set_response_sensitive(response_id
, setting
)
| a response ID |
| TRUE for sensitive |
This method is available in PyGTK 2.18 and above.
Calls gtk_widget_set_sensitive (widget, setting) for each widget in the info bars's action area with the given response_id. A convenient way to sensitize/desensitize dialog buttons.
def set_default_response(response_id
)
| a response ID |
This method is available in PyGTK 2.18 and above.
The set_default_response
() method sets the last widget in the info bar's action area with
the given response_id as the default widget for the dialog.
Pressing "Enter" normally activates the default widget.
Note that this function currently requires info_bar
to
be added to a widget hierarchy.
def response(response_id
)
| a response ID |
This method is available in PyGTK 2.18 and above.
Emits the 'response' signal with the given response_id
.
def set_message_type(message_type
)
| a GtkMessageType |
This method is available in PyGTK 2.18 and above.
The set_message_type
() method sets the message type of the message area.
GTK+ uses this type to determine what color to use
when drawing the message area.