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

Method maximize

PySimpleGUI/PySimpleGUI.py:11268–11283  ·  view source on GitHub ↗

Maximize the window. This is done differently on a windows system versus a linux or mac one. For non-Windows the root attribute '-fullscreen' is set to True. For Windows the "root" state is changed to "zoomed" The reason for the difference is the title bar is removed in so

(self)

Source from the content-addressed store, hash-verified

11266 self.maximized = False
11267
11268 def maximize(self):
11269 """
11270 Maximize the window. This is done differently on a windows system versus a linux or mac one. For non-Windows
11271 the root attribute '-fullscreen' is set to True. For Windows the "root" state is changed to "zoomed"
11272 The reason for the difference is the title bar is removed in some cases when using fullscreen option
11273 """
11274
11275 if not self._is_window_created('tried Window.maximize'):
11276 return
11277 if not running_linux():
11278 self.TKroot.state('zoomed')
11279 else:
11280 self.TKroot.attributes('-fullscreen', True)
11281 # this method removes the titlebar too
11282 # self.TKroot.attributes('-fullscreen', True)
11283 self.maximized = True
11284
11285 def normal(self):
11286 """

Callers 1

Calls 2

_is_window_createdMethod · 0.95
running_linuxFunction · 0.70

Tested by

no test coverage detected