Canalblog
Editer l'article Suivre ce blog Administration + Créer mon blog
Publicité
le blog de Poseidon627
23 avril 2008

PyGTK : Windows : Give a title in the window

Our first window is born.
Now, we can give it a name.
To do this, ther is the method set_title :      

set_title(name_of_my_window)

But in practice, see what happens :

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()

Result :

fen_titre

Publicité
Commentaires
le blog de Poseidon627
Publicité
Derniers commentaires
Publicité