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

Method ButtonPressCallBack

PySimpleGUI/PySimpleGUI.py:4973–4989  ·  view source on GitHub ↗

Not a user callable method. Callback called by tkinter when a "realtime" button is pressed :param parm: Event info passed in by tkinter :type parm:

(self, parm)

Source from the content-addressed store, hash-verified

4971
4972 # Realtime button callback
4973 def ButtonPressCallBack(self, parm):
4974 """
4975 Not a user callable method. Callback called by tkinter when a "realtime" button is pressed
4976
4977 :param parm: Event info passed in by tkinter
4978 :type parm:
4979
4980 """
4981 self.ParentForm.LastButtonClickedWasRealtime = True
4982 if self.Key is not None:
4983 self.ParentForm.LastButtonClicked = self.Key
4984 else:
4985 self.ParentForm.LastButtonClicked = self.ButtonText
4986 # if self.ParentForm.CurrentlyRunningMainloop:
4987 # Window._window_that_exited = self.ParentForm
4988 # self.ParentForm.TKroot.quit() # kick out of loop if read was called
4989 _exit_mainloop(self.ParentForm, self)
4990
4991 def _find_target(self):
4992 target = self.Target

Callers

nothing calls this directly

Calls 1

_exit_mainloopFunction · 0.85

Tested by

no test coverage detected