2018-11-08 20:13:53 +00:00
|
|
|
import PySimpleGUIQt as sg
|
2018-11-06 19:06:54 +00:00
|
|
|
|
|
|
|
layout = [
|
|
|
|
[sg.Text('This is the new Dial Element!')],
|
2018-11-10 22:26:59 +00:00
|
|
|
[sg.T(' ', size=(70,10)), sg.T('0', key='+DIAL_VALUE+', font=('Helvetica', 15))],
|
|
|
|
[sg.Dial(range=(1,100), key='_DIAL_', change_submits=True)],
|
|
|
|
[sg.Slider((1,100), orientation='h', key='_SLIDER_', change_submits=True),
|
|
|
|
sg.T(' 1', key='+SLIDER_VALUE+', font=('Helvetica', 15))],
|
|
|
|
[sg.T('1' + 30*' ' + '100')],
|
2018-11-06 19:06:54 +00:00
|
|
|
[sg.Button('Show'), sg.Button('Exit')]
|
|
|
|
]
|
|
|
|
|
|
|
|
window = sg.Window('Window Title').Layout(layout)
|
|
|
|
|
|
|
|
while True: # Event Loop
|
|
|
|
event, values = window.Read()
|
|
|
|
if event is None or event == 'Exit':
|
|
|
|
break
|
2018-11-10 22:26:59 +00:00
|
|
|
window.FindElement('+DIAL_VALUE+').Update(values['_DIAL_'])
|
|
|
|
window.FindElement('+SLIDER_VALUE+').Update(values['_SLIDER_'])
|
2018-11-06 19:06:54 +00:00
|
|
|
|
|
|
|
window.Close()
|