Python Forum
tkinter frame sizing problems
Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tkinter frame sizing problems
#1
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?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] TKinter Remove Button Frame Nu2Python 8 5,071 Jan-16-2024, 06:44 PM
Last Post: rob101
  Problems trying to position images with Tkinter emont 3 3,251 Dec-12-2023, 07:20 AM
Last Post: menator01
  [Tkinter] Help running a loop inside a tkinter frame Konstantin23 3 3,385 Aug-10-2023, 11:41 AM
Last Post: Konstantin23
  tkinter mapview in a frame janeik 2 2,825 Jun-22-2023, 02:53 PM
Last Post: deanhystad
  [Tkinter] Trouble changing Font within tkinter frame title AnotherSam 1 6,704 Sep-30-2021, 05:57 PM
Last Post: menator01
  [TKINTER] Problems creating directories in a selected path Vulera 2 4,180 Aug-10-2021, 06:38 PM
Last Post: Vulera
  tkinter frame camera opencv Nick_tkinter 9 8,239 Mar-21-2021, 06:41 PM
Last Post: Nick_tkinter
  Tkinter having problems with packing labels? wallgraffiti 0 2,185 Aug-02-2020, 09:26 AM
Last Post: wallgraffiti
  [Tkinter] Tkinter delete values in Entries, when I'm changing the Frame robertoCarlos 11 9,765 Jul-29-2020, 07:13 PM
Last Post: deanhystad
  How to disable focus on Frame in Tkinter? szafranji 1 3,845 May-13-2020, 10:45 PM
Last Post: DT2000

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020