# Dialog (Python)

Marta Maria Casetti
mmcasetti@gmail.com 2012
Une fenêtre surgissante

# Boîte de dialogue

A dialog with the response signal connected to a callback function.

# Code used to generate this example

# Useful methods for a Dialog widget

For an explanation of signals and callback functions, see this page.

Instead of `set_modal(True)` we could have `set_modal(False)` followed by `set_destroy_with_parent(True)` that would destroy the dialog window if the main window is closed.

`add_button(button_text="The Answer", response_id=42)`, where `42` is any integer, is an alternative to `add_button(button_text="text", response_id=Gtk.ResponseType.RESPONSE)`, where `RESPONSE` could be one of `OK, CANCEL, CLOSE, YES, NO, APPLY, HELP`, which in turn correspond to the integers `-5, -6,..., -11`.

# API References

Dans cet exemple, les éléments suivants sont utilisés :

GtkDialog

GtkWindow