Merge pull request #334 from MikeTheWatchGuy/Dev-latest
Test tab inputs
This commit is contained in:
commit
09fe8b9cd4
|
@ -1,7 +1,7 @@
|
||||||
import PySimpleGUI as sg
|
import PySimpleGUI as sg
|
||||||
|
|
||||||
tab1_layout = [[sg.T('This is inside tab 1')]]
|
tab1_layout = [[sg.T('This is inside tab 1')]]
|
||||||
tab2_layout = [[sg.T('This is inside tab 2')]]
|
tab2_layout = [[sg.T('This is inside tab 2'), sg.In(key='in')]]
|
||||||
|
|
||||||
tab3_layout = [[sg.T('This is inside tab 3')]]
|
tab3_layout = [[sg.T('This is inside tab 3')]]
|
||||||
tab4_layout = [[sg.T('This is inside tab 4')]]
|
tab4_layout = [[sg.T('This is inside tab 4')]]
|
||||||
|
@ -14,7 +14,12 @@ layout = [[sg.T('My Window!')],
|
||||||
[sg.MultiTab([[sg.Tab('Tab 1', tab1_layout), sg.Tab('Tab 2', tab2_layout)]]), sg.MultiTab([[sg.Tab('Tab 3', tab3_layout), sg.Tab('Tab 4', tab4_layout)]])],
|
[sg.MultiTab([[sg.Tab('Tab 1', tab1_layout), sg.Tab('Tab 2', tab2_layout)]]), sg.MultiTab([[sg.Tab('Tab 3', tab3_layout), sg.Tab('Tab 4', tab4_layout)]])],
|
||||||
[sg.T('Text in the middle of the mess')],
|
[sg.T('Text in the middle of the mess')],
|
||||||
[sg.MultiTab([[sg.Tab('Tab 5', tab5_layout), sg.Tab('Tab 6', tab6_layout)]])],
|
[sg.MultiTab([[sg.Tab('Tab 5', tab5_layout), sg.Tab('Tab 6', tab6_layout)]])],
|
||||||
|
[sg.RButton('Read')],
|
||||||
]
|
]
|
||||||
window = sg.Window('My window with tabs').Layout(layout)
|
window = sg.Window('My window with tabs').Layout(layout)
|
||||||
|
|
||||||
b, v = window.Read()
|
while True:
|
||||||
|
b, v = window.Read()
|
||||||
|
print(b,v)
|
||||||
|
if b is None: # always, always give a way out!
|
||||||
|
break
|
Loading…
Reference in New Issue