from Tkinter import * class MonBouton(Frame): """ Modification des options fg(Couleur de fond) et bg(Couleur de texte) """ def __init__(self): Frame.__init__(self) self.pack() bt = Button(self, text='Text', command=self.quit) bt.pack() bt.config(bg='navy', fg='white', bd=8) lbl=Label(self, text="Mon label") lbl.pack(expand=YES, fill=BOTH) lbl.config(bg='#FFFFFF', fg='cyan', bd=12) if __name__ == '__main__': MonBouton().mainloop() |
Livres Sur ce Sujet
Apprendre à programmer avec Python 3 Apprenez à programmer en Python Python : Petit guide à l’usage du développeur agile Apprendre à programmer avec Python 3 : Avec plus de 50 pages de corigés d’exercices !