Tabs - location and bar color changes. New demo to show tab location, color
This commit is contained in:
parent
d46a292128
commit
71dca41dfa
2 changed files with 18 additions and 9 deletions
12
Demo_Tabs.py
12
Demo_Tabs.py
|
@ -8,9 +8,17 @@ else:
|
|||
tab1_layout = [[sg.T('This is inside tab 1')]]
|
||||
|
||||
tab2_layout = [[sg.T('This is inside tab 2')],
|
||||
[sg.In(key='in')]]
|
||||
[sg.In(key='_in2_')]]
|
||||
|
||||
layout = [[sg.TabGroup([[sg.Tab('Tab 1', tab1_layout), sg.Tab('Tab 2', tab2_layout)]])],
|
||||
tab3_layout = [[sg.T('This is inside tab 3')],
|
||||
[sg.In(key='_in3_')]]
|
||||
|
||||
tab4_layout = [[sg.T('This is inside tab 4')],
|
||||
[sg.In(key='_in4_')]]
|
||||
|
||||
|
||||
layout = [[sg.TabGroup([[sg.Tab('Tab 1', tab1_layout, key='_mykey_'), sg.Tab('Tab 2', tab2_layout)]], key='_group2_', background_color='green', tab_location='top')],
|
||||
[sg.TabGroup([[sg.Tab('Tab 3', tab3_layout, key='_mykey_'), sg.Tab('Tab 4', tab4_layout)]], key='_group1_', tab_location='right')],
|
||||
[sg.RButton('Read')]]
|
||||
|
||||
window = sg.Window('My window with tabs', default_element_size=(12,1)).Layout(layout)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue