wxPython - Frame() Constructor in Python Last Updated : 28 Apr, 2025 Suggest changes Share Like Article Like Report In this article we will know about the frame() constructor in wxPython. frame() constructor is a constructor for the wx.Frame class of wxPython. This constructor is used to set different attributes of the frame. Syntax : wx.Frame(parent, id=ID_ANY, title="", pos=DefaultPosition, size=DefaultSize, style=DEFAULT_FRAME_STYLE, name=FrameNameStr) Parameters : ParameterInput TypeDescriptionparentwx.WindowParent window. Should not be None.idwx.WindowIDControl identifier. A value of -1 denotes a default value.titlestringTitle to the frame.poswx.PointWindow position.sizewx.WindowWindow size.stylelongWindow style.namestringWindow name. Code: Python3 # import wxPython import wx app = wx.App() # create frame using Frame() constructor frame = wx.Frame(None, id = 10, title ="Frame", pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_FRAME_STYLE, name = "frame") # show frame frame.Show(True) app.MainLoop() Output: Advertise with us Next Article wxPython - Frame() Constructor in Python R RahulSabharwal Follow Similar Reads wxPython | FindControl() function in Python In this particular article we are going to learn about FindControl() function of wx.ToolBar class of wxPython. FindControl() function is used to returns a pointer to the control identified by id or None if no corresponding control is found. It takes only one parameter 'id'. Syntax : wx.ToolBar.FindC 2 min read Python | wxPython module Introduction Python provides wxpython module which allows us to create high functional graphical user interface. It is an Open Source module, which means it is free for anyone to use and the source code is available for anyone to look and modify. It is implemented as a set of extension modules that wrap the GUI 3 min read Constructors in Python In Python, a constructor is a special method that is called automatically when an object is created from a class. Its main role is to initialize the object by setting up its attributes or state. The method __new__ is the constructor that creates a new instance of the class while __init__ is the init 3 min read Button in wxPython - Python In this article we are going to learn how can we add buttons to a frame in wxPython. This can be done by using the Button() constructor of wx.Button class. Following styles are supported in this class: wx.BU_LEFT: Left-justifies the label. Windows and GTK+ only.wx.BU_TOP: Aligns the label to the top 2 min read Python - Create() function in wxPython In this particular article we are going to learn about Create() function present in wx.Frame class. Create function is similar to Frame() constructor of wx.Frame class. Create function is used in two-step frame construction. Syntax : wx.Frame.Create(parent, id=ID_ANY, title="", pos=DefaultPosition, 1 min read Article Tags : Python Python-gui Python-wxPython Practice Tags : python Like