wxPython - StaticLine() constructor in wx.StaticLine Last Updated : 09 Mar, 2023 Comments Improve Suggest changes Like Article Like Report In this article we are going to learn about StaticLine() constructor 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. The line may be only vertical or horizontal. Moreover, not all ports (notably not wxGTK) support specifying the transversal direction of the line (e.g. height for a horizontal line) so for maximal portability you should specify it as DefaultCoord. Syntax: wx.StaticLine.StaticLine(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=LI_HORIZONTAL, name=StaticLineNameStr) Parameters ParameterInput TypeDescriptionparentwx.WindowParent window. Must not be None.idwx.WindowIDWindow identifier. The value wx.ID_ANY indicates a default value.poswx.PointWindow position. If wx.DefaultPosition is specified then a default position is chosen.sizewx.SizeSize. Note that either the height or the width (depending on whether the line is horizontal or vertical) is ignored.stylelongWindow style (either wx.LI_HORIZONTAL or wx.LI_VERTICAL).namestringWindow Name Code Example: Python3 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) # list of choices hlist = ['Item One', 'Item Two'] vlist =['Item One', 'Item Two'] # create vertical line from point (50, 0) to (50, 250) self.sl = wx.StaticLine(pnl, 2, pos =(50, 0), size = (1, 250), style = wx.LI_VERTICAL) # 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() constructor in wx.StaticLine R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Python wxPython-StaticLine Practice Tags : python Similar Reads wxPython - StaticText() constructor in wx.StaticText In this article we are going to learn about StaticText() associated with wx.StaticText class of wxPython. A static text control displays one or more lines of read-only text. wx.StaticText supports the three classic text alignments, label elliptization i.e. replacing parts of the text with the ellips 1 min read wxPython - IsVertical() function in wx.StaticLine In this article we are going to learn about IsVertical() method associated with wx.StaticLine class of wxPython. IsVertical() function is a simple function used in order to return True if the line is vertical, False if horizontal. Syntax: wx.StaticLine.IsVertical(self) Parameters No parameters are r 1 min read wxPython - StatusBar() constructor in wx.StatusBar Status Bar: A status bar is a narrow window that can be placed along the bottom of a frame to give small amounts of status information. In this article, we are going to learn about StatusBar() constructor associated with wx.StatusBar class of wxPython. StatusBar() constructors takes different attrib 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 wxPython - SetLabel() function in wx.StaticText In this article we are going to learn about SetLabel() function associated with wx.StaticText class of wxPython. SetLabel() function is used to set the string label for the Static Text. It takes a string parameter that is used as label for Static Text. Syntax: wx.StaticText.SetLabel(self, label) Par 1 min read Like