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

Method _custom_titlebar_callback

PySimpleGUI/PySimpleGUI.py:12481–12498  ·  view source on GitHub ↗

One of the Custom Titlbar buttons was clicked :param key: :return:

(self, key)

Source from the content-addressed store, hash-verified

12479 self.TKroot.bind('<Expose>', self._custom_titlebar_restore_callback)
12480
12481 def _custom_titlebar_callback(self, key):
12482 """
12483 One of the Custom Titlbar buttons was clicked
12484 :param key:
12485 :return:
12486 """
12487 if key == TITLEBAR_MINIMIZE_KEY:
12488 if not self.DisableMinimize:
12489 self._custom_titlebar_minimize()
12490 elif key == TITLEBAR_MAXIMIZE_KEY:
12491 if self.Resizable:
12492 if self.maximized:
12493 self.normal()
12494 else:
12495 self.maximize()
12496 elif key == TITLEBAR_CLOSE_KEY:
12497 if not self.DisableClose:
12498 self._OnClosingCallback()
12499
12500 def _parse_h_m_s(self, h_m_s):
12501 """

Callers 1

_TextClickedHandlerMethod · 0.80

Calls 4

normalMethod · 0.95
maximizeMethod · 0.95
_OnClosingCallbackMethod · 0.95

Tested by

no test coverage detected