how do i force the output of the tkinter button to the bottom of a window?

The solution is to break your UI into logical groups, and use frames to organize the logical groups. You can make what you have work, but it’s much easier to use frames to organize your widgets.

I see perhaps four logical groups:

  • a set of two buttons stacked vertically
  • a dozen or so buttons aligned vertically
  • a block of statistics with a “histogram” button
  • a histogram

So, start by creating four frames, one for each of those sections. Stacking vertically is best done with pack.

Once you’ve done that, put the various widgets inside one of those frames. Each frame is independent from a layout perspective, so you can use grid or pack in each. Though, since each group seems to be a vertical or horizontal grouping, pack will probably work best in all cases since it excels at left-to-right and top-to-bottom layouts with the fewest lines of code.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top