From 7efdfd4ec6c74a5ed991044ceeeee4a04115d198 Mon Sep 17 00:00:00 2001 From: vincent Date: Sun, 11 Feb 2018 10:36:43 +0100 Subject: [PATCH] etagere_frame en tant que propertie de la class etageres --- cave.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cave.py b/cave.py index 1b86360..c8a7051 100644 --- a/cave.py +++ b/cave.py @@ -51,7 +51,7 @@ class Etageres(object): newetagere=Etagere(int(largeur),int(hauteur),self) self.etageres.append(newetagere) - newetagere.generate_frame(self.fenetre) + newetagere.generate_frame(self.etagere_frame) @@ -59,16 +59,16 @@ class Etageres(object): self.fenetre=Tk() self.fenetre.title(string="cave a vin") - etagere_frame=Frame(self.fenetre) + self.etagere_frame=Frame(self.fenetre) for etagere in self.etageres: - etagere.generate_frame(etagere_frame) + etagere.generate_frame(self.etagere_frame) - framecontrol=LabelFrame(etagere_frame,text="command pannel") + framecontrol=LabelFrame(self.etagere_frame,text="command pannel") framecontrol.grid(column=2,row=1) Button(framecontrol,text="add etagere",command=lambda:self.click_add_etagere()).pack() Button(framecontrol,text="remove etagere").pack() Button(framecontrol,text="save",command=lambda:self.save_etageres("cave")).pack() - etagere_frame.grid(column=1,row=1) + self.etagere_frame.grid(column=1,row=1) scrollbar = Scrollbar(self.fenetre,orient=VERTICAL) scrollbar.grid(column=2,row=1,sticky=N+S) def mainloop(self):