le blog de Poseidon627

Blog sur l'informatique

23 avril 2008

PyGTK : Windows : Give a title in the window

Our first window was born.
Now, we can give it a name.
In order to do that, a method exists :      

set_title(name_of_my_window)

But let us see in practice what it gives :

Code :

#!/usr/bin/env python
# -*- Encoding: Latin-1 -*-

import pygtk
pygtk.require('2.0')
import gtk

def fenetre():

    fenetre = gtk.Window(gtk.WINDOW_TOPLEVEL)
    fenetre.set_default_size(400, 200)
    fenetre.set_title("Ma premiere fenetre")
   
    fenetre.show_all()
    gtk.main()
   
if __name__ == '__main__':
    fenetre()

Résultat :

fen_titre

Posté par Poseidon627 à 10:57 - English - Commentaires [0] - Rétroliens [0] - Permalien [#]

Commentaires

Poster un commentaire







Rétroliens

URL pour faire un rétrolien vers ce message :
http://www.canalblog.com/cf/fe/tb/?bid=287253&pid=8923650

Liens vers des weblogs qui référencent ce message :