2

I'm trying to get a paned widget to grow with a form but whenever I pull the window down vertically, the gap between the paned widget and the status bar grows.

from tkinter import *

root = Tk()

pw = PanedWindow(root, orient='horizontal')

red = LabelFrame(pw, text='red')
Label(red, text='something', anchor='w').grid(row=1, column=1)

blue = LabelFrame(pw, text='blue')
Label(blue, text='anything', anchor='w').grid(row=1, column=1)

pw.add(red, stretch='always')
pw.add(blue, stretch='always')

status = Label(root, text='Status', relief=SUNKEN)

pw.pack(expand=True, fill=BOTH)
status.pack(side=BOTTOM, expand=True, fill=X)

root.mainloop()

Is there a way of stopping the gap between the status bar and the bottom of the window and the gap between the status bar and the paned widget from growing?

cup
  • 7,589
  • 4
  • 19
  • 42

1 Answers1

3

To solve your issue I configured this line:

status.pack(side=BOTTOM, expand=False, fill=X,anchor='n')

For more information see.

Thingamabobs
  • 7,274
  • 5
  • 21
  • 54