# Window (Python)

Tiffany Antopolski
tiffany.antopolski@gmail.com 2012
Marta Maria Casetti
mmcasetti@gmail.com 2012
Une fenêtre de niveau supérieur qui peut contenir d'autres éléments graphiques

# Fenêtre

A minimal Gtk+ Application: a window with a title. | Utilisez Application Window si vous avez besoin de la prise en charge de GMenu.

# Code used to generate this example

# Useful methods for a Window widget

`window = Gtk.Window(application=self, title="Welcome to GNOME")` sets the title as well, without the need for the line `window.set_title("Welcome to GNOME")`. For a general discussion of this, see here.

`set_default_size(200, 100)` sets the default size of the window to a width of `200` and a height of `100`; if instead of a positive number we pass `-1` we have the default size.

`set_position(Gtk.WindowPosition.CENTER)` centers the window. Other options are `Gtk.WindowPosition.NONE, Gtk.WindowPosition.MOUSE, Gtk.WindowPosition.CENTER_ALWAYS, Gtk.WindowPosition.CENTER_ON_PARENT`.

# API References

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

GtkApplication

GtkWindow