MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / main

Function main

DemoPrograms/Demo_GoodColors_2.py:12–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10'''
11
12def main():
13 s10 = (10, 2)
14
15 window = sg.Window('GoodColors', [
16 [sg.Text('Having trouble picking good colors? Try this')],
17 [sg.Text('Here come the good colors as defined by PySimpleGUI')],
18 [sg.Text('Button Colors Using PySimpleGUI.BLUES')],
19
20 [*[sg.Button('BLUES[{}]\n{}'.format(j, c), button_color=(sg.YELLOWS[0], c), size=s10)
21 for j, c in enumerate(sg.BLUES)]],
22 [sg.Text('_' * 100, size=(65, 1))],
23 [sg.Text('Button Colors Using PySimpleGUI.PURPLES')],
24
25 [*[sg.Button('PURPLES[{}]\n{}'.format(j, c), button_color=(sg.YELLOWS[0], c), size=s10)
26 for j, c in enumerate(sg.PURPLES)]],
27 [sg.Text('_' * 100, size=(65, 1))],
28 [sg.Text('Button Colors Using PySimpleGUI.GREENS')],
29
30 [*[sg.Button('GREENS[{}]\n{}'.format(j, c), button_color=(sg.YELLOWS[0], c), size=s10)
31 for j, c in enumerate(sg.GREENS)]],
32 [sg.Text('_' * 100, size=(65, 1))],
33 [sg.Text('Button Colors Using PySimpleGUI.TANS')],
34
35 [*[sg.Button('TANS[{}]\n{}'.format(j, c), button_color=(sg.GREENS[0], c), size=s10)
36 for j, c in enumerate(sg.TANS)]],
37 [sg.Text('_' * 100, size=(65, 1))],
38 [sg.Text('Button Colors Using PySimpleGUI.YELLOWS')],
39
40 [*[sg.Button('YELLOWS[{}]\n{}'.format(j, c), button_color=('black', c), size=s10)
41 for j, c in enumerate(sg.YELLOWS)]],
42
43 [sg.Text('_' * 100, size=(65, 1))],
44 [sg.Button('Click ME!')]
45 ], default_element_size=(30, 2))
46
47 event, values = window.read()
48 window.close()
49
50
51if __name__ == '__main__':

Callers 1

Calls 2

readMethod · 0.95
closeMethod · 0.95

Tested by

no test coverage detected