MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / get_screen_dimensions

Method get_screen_dimensions

PySimpleGUI/PySimpleGUI.py:11214–11226  ·  view source on GitHub ↗

Get the screen dimensions. NOTE - you must have a window already open for this to work (blame tkinter not me) :return: Tuple containing width and height of screen in pixels :rtype: Tuple[None, None] | Tuple[width, height]

(self)

Source from the content-addressed store, hash-verified

11212 print('*** Error loading form to disk ***')
11213
11214 def get_screen_dimensions(self):
11215 """
11216 Get the screen dimensions. NOTE - you must have a window already open for this to work (blame tkinter not me)
11217
11218 :return: Tuple containing width and height of screen in pixels
11219 :rtype: Tuple[None, None] | Tuple[width, height]
11220 """
11221
11222 if self.TKrootDestroyed or self.TKroot is None:
11223 return Window.get_screen_size()
11224 screen_width = self.TKroot.winfo_screenwidth() # get window info to move to middle of screen
11225 screen_height = self.TKroot.winfo_screenheight()
11226 return screen_width, screen_height
11227
11228 def move(self, x, y):
11229 """

Callers 2

guiFunction · 0.95
move_to_centerMethod · 0.95

Calls 1

get_screen_sizeMethod · 0.80

Tested by

no test coverage detected