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
[amazon_image id=”2212134347″ link=”true” target=”_blank” size=”medium” ]Apprendre à programmer avec Python 3[/amazon_image] [amazon_image id=”B005J2L260″ link=”true” target=”_blank” size=”medium” ]Apprenez à programmer en Python[/amazon_image] [amazon_image id=”2100508830″ link=”true” target=”_blank” size=”medium” ]Python : Petit guide à l’usage du développeur agile[/amazon_image] [amazon_image id=”2212127081″ link=”true” target=”_blank” size=”medium” ]Apprendre à programmer avec Python 3 : Avec plus de 50 pages de corigés d’exercices ![/amazon_image]