wx.DisplaySize() function in wxPython
Last Updated :
01 Aug, 2020
In this article, we are going to learn about DisplaySize() function present in wxPython. DisplaySize() function is one of the parent function of wxPython. It returns the display size in pixels. Either of output pointers can be None if the caller is not interested in the corresponding value.
Syntax:
wx.DisplaySize()
Parameters:
DisplaySize() function requires no parameters.
Returns:
( width, height )
Return Type:
tuple
Code Example:
import wx
class Example(wx.Frame):
def __init__( self , * args, * * kwargs):
super (Example, self ).__init__( * args, * * kwargs)
self .InitUI()
def InitUI( self ):
print (wx.DisplaySize())
def main():
app = wx.App()
ex = Example( None )
ex.Show()
app.MainLoop()
if __name__ = = '__main__' :
main()
|
Output:
(1536, 864)
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...