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

Method get_screen_size

PySimpleGUI/PySimpleGUI.py:10186–10197  ·  view source on GitHub ↗

This is a "Class Method" meaning you call it by writing: width, height = Window.get_screen_size() Returns the size of the "screen" as determined by tkinter. This can vary depending on your operating system and the number of monitors installed on your system. For Windows, the prima

(self)

Source from the content-addressed store, hash-verified

10184
10185 @classmethod
10186 def get_screen_size(self):
10187 """
10188 This is a "Class Method" meaning you call it by writing: width, height = Window.get_screen_size()
10189 Returns the size of the "screen" as determined by tkinter. This can vary depending on your operating system and the number of monitors installed on your system. For Windows, the primary monitor's size is returns. On some multi-monitored Linux systems, the monitors are combined and the total size is reported as if one screen.
10190
10191 :return: Size of the screen in pixels as determined by tkinter
10192 :rtype: (int, int)
10193 """
10194 root = _get_hidden_master_root()
10195 screen_width = root.winfo_screenwidth()
10196 screen_height = root.winfo_screenheight()
10197 return screen_width, screen_height
10198
10199 @property
10200 def metadata(self):

Callers 11

settingsFunction · 0.80
make_windowFunction · 0.80
_display_notificationFunction · 0.80
display_notificationFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
get_screen_dimensionsMethod · 0.80
__init__Method · 0.80
notifyMethod · 0.80

Calls 1

_get_hidden_master_rootFunction · 0.85

Tested by

no test coverage detected