Merge pull request #2816 from PySimpleGUI/Dev-latest
Slider default value set to 100
This commit is contained in:
commit
54a708a727
|
@ -109,7 +109,7 @@ class GameOfLife:
|
||||||
[self.graph],
|
[self.graph],
|
||||||
[sg.Button('Go!', key='-DONE-'),
|
[sg.Button('Go!', key='-DONE-'),
|
||||||
sg.Text(' Delay (ms)'),
|
sg.Text(' Delay (ms)'),
|
||||||
sg.Slider([0, 800],
|
sg.Slider((0, 800), 100,
|
||||||
orientation='h',
|
orientation='h',
|
||||||
key='-SLIDER-',
|
key='-SLIDER-',
|
||||||
enable_events=True,
|
enable_events=True,
|
||||||
|
@ -124,7 +124,7 @@ class GameOfLife:
|
||||||
sg.Text('', size=(3, 1), key='-S2-OUT-')]
|
sg.Text('', size=(3, 1), key='-S2-OUT-')]
|
||||||
]
|
]
|
||||||
|
|
||||||
self.window = sg.Window('Window Title', layout, finalize=True)
|
self.window = sg.Window('John Conway\' Game of Life', layout, finalize=True)
|
||||||
event, values = self.window.read(timeout=0)
|
event, values = self.window.read(timeout=0)
|
||||||
self.delay = values['-SLIDER-']
|
self.delay = values['-SLIDER-']
|
||||||
self.window['-S1-OUT-'].update(values['-SLIDER-'])
|
self.window['-S1-OUT-'].update(values['-SLIDER-'])
|
||||||
|
|
Loading…
Reference in New Issue