Merge pull request #2816 from PySimpleGUI/Dev-latest

Slider default value set to 100
This commit is contained in:
PySimpleGUI 2020-04-14 12:43:21 -04:00 committed by GitHub
commit 54a708a727
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ class GameOfLife:
[self.graph],
[sg.Button('Go!', key='-DONE-'),
sg.Text(' Delay (ms)'),
sg.Slider([0, 800],
sg.Slider((0, 800), 100,
orientation='h',
key='-SLIDER-',
enable_events=True,
@ -124,7 +124,7 @@ class GameOfLife:
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)
self.delay = values['-SLIDER-']
self.window['-S1-OUT-'].update(values['-SLIDER-'])