sg.Button('Popout')], ] window = sg.Window('This is your Application Window', layout) counter = 0 timeout = 100 # Start the program with the popout window showing so you can immediately start debugging! imwatchingyou.show_debugger_popout_window() while True: # Your Event Loop event, values = window.Read(timeout=timeout) if event in (None, 'Exit'): break elif event == 'Ok': print('You clicked Ok.... this is where print output goes') imwatchingyou.show_debugger_popout_window() # STEP 2 also elif event == 'Debugg': imwatchingyou.show_debugger_window() # STEP 2 elif event == 'Popout': imwatchingyou.show_debugger_popout_window() # STEP 2 counter += 1 # to prove window is operating, show the input in another area in the window. window.Element('_OUT_').Update(values['_IN_']) # don't worry about the "state" of things, just call this function "frequently" imwatchingyou.refresh_debugger() # STEP 3 - refresh debugger window.Close()
] # титульное окно window = sg.Window(testWindows, layout, size=(1024, 720), icon="img/icon.ico", element_justification='c') progress_bar = window.FindElement('progress') # белый список while True: # ифелс event, value = window.read() if event in ('Выход', sg.WIN_CLOSED): break if event in (about_me, 'n:78'): about_me() imwatchingyou.refresh_debugger() # белый список в действии if event in dispatch_dictionary: func_to_call = dispatch_dictionary[event] # словарь в действии func_to_call() else: sg.Print('функции "{}" не существует в данной версии'.format(event)) window.close() del window