1 pièce(s) jointe(s)
Couleur de fond d'un Canvas
Bonjour/Bonsoir,
Je souhaite faire une "séparation" dans mon interface en mettant un ou plusieurs ligne de pixels de couleurs différentes.
J'ai donc créé un canvas de 1 pixel et j'ai changé la couleur sauf que le résultat n'est bon, la couleur de base de la fenêtre apparaît alors que je l'ai changé.
Pièce jointe 166905
Quelqu'un a une idée pour résoudre ce problème ?
Voici mon code, enfin le début : (Je suis sur windows 8)
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
class Interface(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.grid()
self.configure(bg="#47484b")
self.width = self.winfo_screenwidth()-63
self.height = self.winfo_screenheight()
Label(self, text="Balistique - Etude de trajectoire", fg='#f8f8f8', bg='#47484b', justify=CENTER).grid(row=0, columnspan=8, pady=1)
Canvas(self, height=1, width=self.width, bg="#47484b").grid(row=1, columnspan=8, sticky=S)
root = Tk()
width = root.winfo_screenwidth()-60
height = root.winfo_screenheight()
root.geometry(str(width)+"x"+str(height)+"+0+0")
root.overrideredirect(True)
root.configure(bg='#47484b')
inter = Interface(master=root)
inter.mainloop()
root.destroy() |