MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / _main_switch_theme

Function _main_switch_theme

PySimpleGUI/PySimpleGUI.py:25315–25328  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25313
25314
25315def _main_switch_theme():
25316 layout = [
25317 [Text('Click a look and feel color to see demo window')],
25318 [Listbox(values=theme_list(),
25319 size=(20, 20), key='-LIST-')],
25320 [Button('Choose'), Button('Cancel')]]
25321
25322 window = Window('Change Themes', layout)
25323
25324 event, values = window.read(close=True)
25325
25326 if event == 'Choose':
25327 theme_name = values['-LIST-'][0]
25328 theme(theme_name)
25329
25330
25331

Callers 1

mainFunction · 0.85

Calls 7

readMethod · 0.95
TextClass · 0.85
ListboxClass · 0.85
theme_listFunction · 0.85
ButtonClass · 0.85
WindowClass · 0.85
themeFunction · 0.85

Tested by

no test coverage detected