# Statusbar (Python)

Marta Maria Casetti
mmcasetti@gmail.com 2012
Report messages of minor importance to the user

# Statusbar

This statusbar tells you if you click the button or if you press any key (and which key).

# Code used to generate this example

`Gdk.keyval_name(event.keyval)` converts the key value `event.keyval` into a symbolic name. The names and corresponding key values can be found here, but for instance `GDK_KEY_BackSpace` becomes the string `"BackSpace"`.

# Useful methods for a Statusbar widget

In line 17 the signal `"clicked"` is connected to the callback function `button_clicked_cb()` using `widget.connect(signal, callback function)`. See for a more detailed explanation.

`pop(context_id)` removes the first message in the statusbar stack with the given `context_id`.

`remove_all(context_id)` removes all the messages in the statusbar stack with the given `context_id`.

`remove(context_id, message_id)` removes the message with the given `message_id` in the statusbar stack with the given `context_id`. The `message_id` is returned by `push(context_id, "the message")` when pushing the message on the statusbar.

# API References

In this sample we used the following:

GtkStatusbar

Gdk - Key Values