Call reference
class: EventSimpleGUI( )
Use this class to start a window and create events
Exemple:
loop = EventSimpleGUI()
method: add_event( event )
You can use this method, but it is recomended to use decor @EventSimpleGUI.event
:param event: Must be an event function
Exemple:
def func(*args):
print(args)
loop.add_event(func)
property: get_events( )
Use this property to get all events, from @event or add_event
:return: List of event functions
Exemple:
loop.get_events
method: run_window( window, args, *keyargs)
Use this property to get all events, from @event or add_event
params | resume |
---|---|
Window | can be any PySimpleGUI Window |
args | can be any function that recives (event: str , values: dict, window: PySimpleGUI.Window) |
window_log | if True prints events and values on the console |
return_values | if True return values of window.read() |
task | can be any calable function |
close event | a diferent key to close the window |
return | dict of values or None |
Exemple:
win = sg.Window('win', [[sg.T('hello world')]])
loop.run_window(win)
decorator: event( key )
Use this decorator to create an event function
param key | event string or a list of them |
Exemple:
win = sg.Window('win', [[sg.T('hello world')]])
loop.run_window(win)