loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import PySimpleGUIWeb as sg  
  
print('Startup up...')  

layout = [[sg.Text('Slider Demonstration'), sg.Text('', key='_OUTPUT_')],  
            [sg.T('0',key='_LEFT_'),  
             sg.Slider((1,100), key='_SLIDER_', orientation='h', enable_events=True),  
             sg.T('0', key='_RIGHT_')],  
            [sg.Button('Show'), sg.Button('Exit')]]  
  
window = sg.Window('Window Title', layout)
  
while True:             # Event Loop  
  event, values = window.Read()  
  print(event, values)  
  if event is None or event == 'Exit':  
      break  
  window.Element('_LEFT_').Update(values['_SLIDER_'])  
  window.Element('_RIGHT_').Update(values['_SLIDER_'])  
  
window.Close()