Answer the question
In order to leave comments, you need to log in
tkinter. How to make a frame occupy the entire free area?
import tkinter as tk
root = tk.Tk()
root.maxsize(250,700)
root.minsize(250,150)
listFrame = tk.Frame(root, width = 250)
playerFrame = tk.Frame(root,width = 250, height=100)
listFrame.pack(side="top",fill = "both")
playerFrame.pack(side="bottom")
a = tk.Button(listFrame, text="bad")
b = tk.Button(playerFrame,text="good")
b.pack(side="top")
a.pack(side="bottom")
root.mainloop()
Answer the question
In order to leave comments, you need to log in
like this ?
import tkinter as tk
root = tk.Tk()
root.maxsize(250,700)
root.minsize(250,150)
listFrame = tk.Frame(root, width = 250, bg='green') # цвет для наглядности
playerFrame = tk.Frame(root,width = 250, height=100)
listFrame.pack(fill="both", side="top", expand=True)
playerFrame.pack(side="bottom")
a = tk.Button(listFrame, text="bad")
a.pack(side="bottom")
b = tk.Button(playerFrame,text="good")
b.pack(side="top")
root.mainloop()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question