Home > Mobile >  How to only allow the top frame verticaly stretch
How to only allow the top frame verticaly stretch

Time:01-07

I try to adopt enter image description here

My question is, how to keep that 'Button' at the verry bottom, while the bottom of treeview frame move up and down when I resize the main window.

CodePudding user response:

You need to:

  • make self.tree to fill all available space by setting fill=tk.BOTH:
self.tree.pack(expand=True, fill=tk.BOTH)  # added fill=tk.BOTH
  • disable expand of self.frameBT by removing expand=True:
self.frameBT.pack(fill=tk.X)  # removed expand=True
  •  Tags:  
  • Related