
How can I achieve nesting frames in this way. One left Frame (Frame 1), one Right (Frame 2). With another Frame (Frame 3) nested inside and but under the Left Frame contents?
Does the formatting allow for this?
From outside to inside for your design
layout = [
[sg.Frame("Frame1", ...), sg.Frame("Frame2", ...)],
]
layout = [
[sg.Frame("frame 4", ...],
[sg.Frame("Frame 3", ...],
]
layout = [
[sg.Frame("Frame 5", ...), sg.Frame("Frame 6", ...)],
]
That's all !
import PySimpleGUI as sg
def blank_frame():
return sg.Frame("", [[]], pad=(5, 3), expand_x=True, expand_y=True, background_color='#404040', border_width=0)
sg.theme('DarkGrey4')
layout_frame1 = [
[blank_frame(), blank_frame()],
[sg.Frame("Frame 3", [[blank_frame()]], pad=(5, 3), expand_x=True, expand_y=True, title_location=sg.TITLE_LOCATION_TOP)],
]
layout_frame2 = [[blank_frame()]]
layout = [
[sg.Frame("Frame 1", layout_frame1, size=(280, 250)),
sg.Frame("Frame 2", layout_frame2, size=(200, 250), title_location=sg.TITLE_LOCATION_TOP)],]
window = sg.Window("Title", layout, margins=(2, 2), finalize=True)
while True:
event, values = window.read()
if event == sg.WINDOW_CLOSED:
break
window.close()

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With