I am working on a simple tkinter gui- one panedwindow and two frames inside it. The resizing is working fine. The problem is that when I add the second frame to the same panedwindow, it takes up all the space as shown in the image. Is there a way to set a default size for the child frames in the panedwindow and still be able to resize them using sash? I tried setting height using paneconfigure but it doesn't help. Any pointers are welcome. I just want frame2 to have a smaller height than frame1 initially.
pw = tk.PanedWindow(root, orient="vertical", sashpad=1)
pw.pack(fill=tk.BOTH, expand=1)
frame1= tk.Frame(pw, bg="#CFD8DC")
frame2 = tk.Frame(pw, bg="#fafafa")
pw.add(frame1)
pw.add(frame2)