I just started using tkinter and I am feeling good about it, but I am now facing an issue and can't seem to find anything about it. I am currently trying to create this shape with PanedWindow():
########|#######
# | #
--------|-------
# | #
########|#######
I currently have a code that does create this shape and I can resize the pane windows (- & |). The problem is that I need these (|) to move together like these (-). If that wasn't clear, I am trying to move the center dividers together. Currently, they are like so :
###|############
# | #
----------------
# | #
############|###
If this is still not clear, try it out! I put the code below. As you can see, you can move the vertical lines together, but not the horizontal ones. I know that the reason is that there are 2 independent pane windows inside of one main pane window, so they act independently. I still don't know how I could link them together!
from tkinter import *
master = Tk()
master.geometry("400x400")
# Main Pane
main_panel = PanedWindow(orient=VERTICAL, bd=2, relief="solid", bg="black")
main_panel.pack(fill="both", expand=1)
# Sub Panes
##############################################################################
top_left = PanedWindow(main_panel, bd=1, relief="solid", bg="black")
top_left.pack(fill="both", expand=1)
left_label = Label(top_left, text= "Left-top")
top_left.add(left_label)
top_right = PanedWindow(top_left, orient=VERTICAL, bd=4)
top_left.add(top_right)
right_label = Label(top_left, text= "Right-top")
top_right.add(right_label)
#############################################################
bottom_left = PanedWindow(main_panel, bd=1, relief="solid", bg="black")
bottom_left.pack(fill="both", expand=1)
left_label = Label(bottom_left, text= "Left-bottom")
bottom_left.add(left_label)
bottom_right = PanedWindow(bottom_left, orient=VERTICAL, bd=4)
bottom_left.add(bottom_right)
right_label = Label(bottom_left, text= "Right-bottom")
bottom_right.add(right_label)
main_panel.add(top_left)
main_panel.add(bottom_left)
mainloop()