Web Analytics Made Easy - Statcounter
Skip to content


Tabs bring not only an extra level of sophistication to your window layout, they give you extra room to add more elements. Tabs are one of the 3 container Elements, Elements that hold or contain other Elements. The other two are the Column and Frame Elements.


import PySimpleGUI as sg    

tab1_layout =  [[sg.T('This is inside tab 1')]]    

tab2_layout = [[sg.T('This is inside tab 2')],    

layout = [[sg.TabGroup([[sg.Tab('Tab 1', tab1_layout, tooltip='tip'), sg.Tab('Tab 2', tab2_layout)]], tooltip='TIP2')],    

window = sg.Window('My window with tabs', layout, default_element_size=(12,1))    

while True:    
    event, values = window.read()    
    if event == sg.WIN_CLOSED:           # always,  always give a way out!