Python Forum
Grid geometry doesnt work as expected
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Grid geometry doesnt work as expected
#4
Default grid behavior is this, and most likely what you're experiencing, empty cells collapse to 0 width & height. Empty cells collapsing also affects empty rows & columns potentially resulting in rows & columns of 0 width and height. while not desirable in some/many cases empty cells collapsing, directly related to occupying required space facilitating their hosted controls dimensions exclusively, is predictable (consistent) and expected as the lack of content in a cell essentially leaves that cell in an uninitialized-like state.

While columns and rows may be set with weighted characteristics the ability to determine or set a static width and height explicitly is non-existent from what I've found, so far, researching Tkinter and TK both.

A work-around concerning spacing is similar to what is often used in web-grid-layouts utilizing tables long ago requiring shims generally being a transparent image. I'm not a fan of work-arounds myself feeling that they generally disrupt system flow & development intellectually and obscure oversight & laziness if not simply explicit disregard/refusal to advance the underlying system.

I do think Tkinter to be interesting and an excellent, portable solution, but with limitations while being minor have far reaching impact on adoption & built-in functionality. I find that understanding the TK/Tkinter system fundamental, but am looking into Kivy myself. wxPython, mentioned previously by Larz60+, is seasoned, robust and comes with phenomenal back-end support for just about anything imaginable (more like an OS dev kit than GUI library).

Take care and best wishes on finding resolution.
Reply


Messages In This Thread
Grid geometry doesnt work as expected - by Sigmiami - Oct-06-2018, 02:30 AM
RE: Grid geometry doesnt work as expected - by The_Raven - Oct-25-2018, 04:56 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Beginner question re: Tkinter geometry return2sender 3 973 Jun-19-2023, 06:19 PM
Last Post: deanhystad
Question [Tkinter] How to change geometry? Meffy 4 2,896 Jan-31-2021, 10:35 AM
Last Post: Meffy
  [Tkinter] Window geometry appears different on Win and Linux steve_shambles 6 7,143 Nov-29-2019, 12:30 AM
Last Post: steve_shambles
  Not understanding the correlation between code and geometry with Tkninter Intelligent_Agent0 3 2,982 Aug-04-2018, 08:22 AM
Last Post: Axel_Erfurt
  Button click doesnt work from my second class/layout in Python imamideb 0 2,372 Feb-13-2018, 12:09 PM
Last Post: imamideb

Forum Jump:

User Panel Messages

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