Completely new set of materials for GUI class! Thanks Tony!!
This commit is contained in:
parent
ee0765c345
commit
8f7356f425
53 changed files with 1909 additions and 903 deletions
18
ProgrammingClassExamples/9b PSG Tabs example.py
Normal file
18
ProgrammingClassExamples/9b PSG Tabs example.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import PySimpleGUI as sg
|
||||
|
||||
tab1_layout = [[sg.Text('This is inside tab 1')]]
|
||||
|
||||
tab2_layout = [[sg.Text('This is inside tab 2')]]
|
||||
|
||||
layout = [[sg.TabGroup([[sg.Tab('Tab 1', tab1_layout),
|
||||
sg.Tab('Tab 2', tab2_layout)]])],
|
||||
[sg.ReadButton('Read')]]
|
||||
|
||||
window = sg.Window('Main Window').Layout(layout)
|
||||
|
||||
while True:
|
||||
b, v = window.Read()
|
||||
if b is not None:
|
||||
print(b,v)
|
||||
else:
|
||||
break
|
Loading…
Add table
Add a link
Reference in a new issue