Python Forum
[Tkinter] grid layout
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] grid layout
#8
There is currently a problem with images.
Nevertheless, I want you to see the advantage of adding row and column numbers
to a gui layout, so will still send it later.

Your page 1 and page 2 are different sizes, and that is a problem. Any overlay that
uses raise or lower must be exactly the same size.

The reason they are two sizes is the way grid geometry works. The full frame does not display unless
something within fills out the space. It has the added problem that it will grow on its own if the
space is too small.

If you use pack for the containers, and the space for it's contents is too small, the contents will get
truncated, rather than grow the container which is much better than having the container automatically change size.

For this reason, change your containers (p1 and p2) to pack geometry, and keep grid for all contents of
of these containers. Make sure you specify fill='both' and expand='True' in the pack command.

This should fix the problem.

finally got the size right
Reply


Messages In This Thread
grid layout - by neech - Oct-07-2016, 06:18 PM
RE: tkinter grid layout - by neech - Oct-07-2016, 09:05 PM
RE: tkinter grid layout - by Larz60+ - Oct-07-2016, 09:55 PM
RE: tkinter grid layout - by neech - Oct-07-2016, 11:55 PM
RE: grid layout - by Larz60+ - Oct-13-2016, 09:41 AM
RE: grid layout - by Yoriz - Oct-13-2016, 11:56 AM
RE: grid layout - by Larz60+ - Oct-13-2016, 10:07 PM
RE: grid layout - by Larz60+ - Oct-13-2016, 11:16 PM
RE: grid layout - by Larz60+ - Oct-14-2016, 07:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using Grid layout and QHBox hobbyist 1 3,104 Jan-26-2021, 12:35 AM
Last Post: deanhystad
  pyqt5 layout Nickd12 8 3,521 Jan-18-2021, 09:09 AM
Last Post: Axel_Erfurt
  [Kivy] Weird spacing in grid layout test 3 3,475 Nov-08-2019, 04:37 PM
Last Post: Axel_Erfurt
  Python GUI layout off between different OS shift838 5 3,732 Jan-02-2019, 02:53 AM
Last Post: shift838

Forum Jump:

User Panel Messages

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