etagere_frame en tant que propertie de la class etageres
This commit is contained in:
parent
8deec4e75e
commit
7efdfd4ec6
10
cave.py
10
cave.py
@ -51,7 +51,7 @@ class Etageres(object):
|
|||||||
newetagere=Etagere(int(largeur),int(hauteur),self)
|
newetagere=Etagere(int(largeur),int(hauteur),self)
|
||||||
|
|
||||||
self.etageres.append(newetagere)
|
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=Tk()
|
||||||
self.fenetre.title(string="cave a vin")
|
self.fenetre.title(string="cave a vin")
|
||||||
|
|
||||||
etagere_frame=Frame(self.fenetre)
|
self.etagere_frame=Frame(self.fenetre)
|
||||||
for etagere in self.etageres:
|
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)
|
framecontrol.grid(column=2,row=1)
|
||||||
Button(framecontrol,text="add etagere",command=lambda:self.click_add_etagere()).pack()
|
Button(framecontrol,text="add etagere",command=lambda:self.click_add_etagere()).pack()
|
||||||
Button(framecontrol,text="remove etagere").pack()
|
Button(framecontrol,text="remove etagere").pack()
|
||||||
Button(framecontrol,text="save",command=lambda:self.save_etageres("cave")).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 = Scrollbar(self.fenetre,orient=VERTICAL)
|
||||||
scrollbar.grid(column=2,row=1,sticky=N+S)
|
scrollbar.grid(column=2,row=1,sticky=N+S)
|
||||||
def mainloop(self):
|
def mainloop(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user