improve windows redimentionement

This commit is contained in:
vincent 2018-08-23 23:47:23 +02:00
parent c74fb7a6cc
commit 6520670a8c

View File

@ -142,8 +142,11 @@ class EtageresUI(Tk):
self.mainframe=Frame(self)
vscrollbar = Scrollbar(self.mainframe, orient=VERTICAL)
hscrollbar = Scrollbar(self.mainframe, orient=HORIZONTAL)
self.etagere_frame = Canvas(self.mainframe,xscrollcommand=hscrollbar.set, yscrollcommand=vscrollbar.set,width=1000,height=1000)
self.geometry("1000x500")
self.etagere_frame = Canvas(self.mainframe,xscrollcommand=hscrollbar.set, yscrollcommand=vscrollbar.set,width=700,height=1000)
def dim_etage_frame(event):
self.etagere_frame.config(height=(self.winfo_height()-50),width=(self.winfo_width()-150))
self.bind("<Configure>",dim_etage_frame)
for etagere in self.etageres:
newetagere=EtagereUI(etagere, self)
self.etageresUI.append(newetagere)