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] Trouble changing Font within tkinter frame title AnotherSam 1 1,559 Sep-30-2021, 05:57 PM
Last Post: menator01
  [TKINTER] Problems creating directories in a selected path Vulera 2 1,594 Aug-10-2021, 06:38 PM
Last Post: Vulera
  tkinter frame camera opencv Nick_tkinter 9 3,112 Mar-21-2021, 06:41 PM
Last Post: Nick_tkinter
  Tkinter having problems with packing labels? wallgraffiti 0 919 Aug-02-2020, 09:26 AM
Last Post: wallgraffiti
  [Tkinter] Tkinter delete values in Entries, when I'm changing the Frame robertoCarlos 11 3,235 Jul-29-2020, 07:13 PM
Last Post: deanhystad
  How to disable focus on Frame in Tkinter? szafranji 1 2,125 May-13-2020, 10:45 PM
Last Post: DT2000
  [Tkinter] Problems to display Web Scraping values in Tkinter Lucas_Ribeiro 0 1,074 May-07-2020, 12:36 AM
Last Post: Lucas_Ribeiro
  [Tkinter] Tkinter bringing variables from 1 frame to another zukochew 6 9,308 Dec-26-2019, 05:27 AM
Last Post: skm
  Unable to put background image on Tkinter Frame jenkins43 2 7,777 Nov-27-2019, 11:38 AM
Last Post: jenkins43
  [Tkinter] Scrollbar, Frame and size of Frame Maksim 2 7,037 Sep-30-2019, 07:30 AM
Last Post: Maksim

Forum Jump:

User Panel Messages

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