Python Forum
tkinter frame sizing problems - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: tkinter frame sizing problems (/thread-4560.html)



tkinter frame sizing problems - Lux - Aug-26-2017

I am working on a project with tkinter, and I am trying to make a frame and a ScrolledText widget fill up the screen.
The relevant code looks like this:
opBar = Frame(win)
opBar.pack(fill=BOTH, padx=5, pady=5, side=BOTTOM)
text = ScrolledText.ScrolledText(win)
text.pack(fill=X, padx=5, pady=5)
The problem I am having is that there is a gap between these two widgets. The frame contains a button, and I can't get the frame height to be any larger than the button height. I am trying to use the fill option in pack to fix this- it works just fine with fill=X, changing the frame's width to go across the whole screen. However, it did not have the same effect on the height.
What is going on with this?