Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

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.


 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.  

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course

DisplaySize() function requires no parameters.

( width, height )

Return Type:

Code Example:

# importing the module
import wx
# definition of the Example class
class Example(wx.Frame):
    # instantiating the class
    def __init__(self, *args, **kwargs):
        super(Example, self).__init__(*args, **kwargs)
    # method for creation of user interface
    def InitUI(self):
        # print the size of display
# definition of the main function
def main():
    # creating an App object
    app = wx.App()
    # creating an Example object
    ex = Example(None)
    # showing the Example object
    # running the App object
# driver code
if __name__ == '__main__':


(1536, 864)

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!