wxPython - Create Static Box using Create() method Last Updated : 08 Jul, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article we are going to learn about Static Box in wxPython. A static box is a rectangle drawn around other windows to denote a logical grouping of items. In this article we will create Static Box using two step creation, in order to do that we will use Create() method. Syntax: wx.StaticBox.Create(parent, id=ID_ANY, label="", pos=DefaultPosition, size=DefaultSize, style=0, name=StaticBoxNameStr) Parameters Parameter Input Type Description parent wx.Window Parent window. Must not be None. id wx.WindowID Window identifier. The value wx.ID_ANY indicates a default value. label string Text to be displayed in the static box, the empty string for no label. pos wx.Point Window position. If wx.DefaultPosition is specified then a default position is chosen. size wx.Size Checkbox size. If wx.DefaultSize is specified then a default size is chosen. style long Window style. There are no StaticBox-specific styles, but generic ALIGN_LEFT, ALIGN_CENTRE_HORIZONTAL and ALIGN_RIGHT can be used here to change the position of the static box label when using wxGTK name string Window name Return Type: bool Code Example: Python3 1== import wx class FrameUI(wx.Frame): def __init__(self, parent, title): super(FrameUI, self).__init__(parent, title = title, size =(300, 200)) # function for in-frame components self.InitUI() def InitUI(self): # parent panel for radio box pnl = wx.Panel(self) # initialize static box self.sb = wx.StaticBox() # create static box self.sb.Create(pnl, 2, label ="Static Box", pos =(20, 20), size =(100, 100)) # set frame in centre self.Centre() # set size of frame self.SetSize((400, 250)) # show output frame self.Show(True) # wx App instance ex = wx.App() # Example instance FrameUI(None, 'RadioButton and RadioBox') ex.MainLoop() Output Window: Comment More infoAdvertise with us Next Article wxPython - Staticline using Create() function R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Python wxPython-StaticBox Practice Tags : python Similar Reads wxPython - Create Radio Button using Create() function Create() function is used for the two-step construction of Radio Button in wxPython. Create() function takes different attributes of radio button as an argument Syntax:  wx.RadioButton.Create(parent, id=ID_ANY, label="", pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, nam 1 min read wxPython - Staticline using Create() function In this article we are going to learn about Create() method associated with wx.StaticLine class of wxPython. A static line is just a line which may be used in a dialog to separate the groups of controls. Create() function creates Staticline using two step creation. The line may be only vertical or h 2 min read wxPyhon - BitmapButton using Create() method In this article we will learn about how we can create a BitmapButton using Create() function. Create() function is a button creation function for two-step creation. BitmapButton() constructor cannot be used for two step BitmapButton creation. It takes different Bitmap Button attributes as parameters 1 min read wxPython - Create Radio Box with two step creation In this article we are going to learn to create a radio box in a frame. A radio box item is used to select one of number of mutually exclusive choices. It is displayed as a vertical column or horizontal row of labelled buttons. In order to create radio box we will use Create() function in wx.RadioBo 2 min read wxPython | create control tool using CreateTool() function In this function, we are going to learn how can we create a control tool using CreateTool() function. It is another version of CreateTool() function which only takes two parameters that is control and label. Let's see the parameters in detail. Parameters : ParameterInput TypeDescriptioncontrolwx.Con 1 min read wxPython - Enable() method in wx.StaticBox In this article we are going to learn about Enable() method associated with wx.StaticBox class of wxPython. Enable() function is simply used in order to enable or disable the box without affecting its label window, if any. It takes a boolean 'enable' parameter if True enables the window else disable 1 min read Like