wxPython - StaticText() constructor in wx.StaticText Last Updated : 18 Jun, 2020 Comments Improve Suggest changes Like Article Like Report 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 ellipsis (“…”) if the label doesn’t fit into the provided space and also formatting markup with wx.Control.SetLabelMarkup . Syntax: wx.StaticText.StaticText(parent, id=ID_ANY, label="", pos=DefaultPosition, size=DefaultSize, style=0, name=StaticTextNameStr) Parameters: Parameter Input Type Description parent wx.Window Parent window. Should not be None. id wx.Window Parent window. Should not be None. parent wx.WindowID Control identifier. A value of -1 denotes a default value. label string Text label. pos wx.Point Window position. size wx.Size Window size. style long Window style. name string Window name. Code Example: Python3 1== import wx class Example(wx.Frame): def __init__(self, *args, **kwargs): super(Example, self).__init__(*args, **kwargs) self.InitUI() def InitUI(self): self.locale = wx.Locale(wx.LANGUAGE_ENGLISH) self.pnl = wx.Panel(self) bmp = wx.Bitmap('right.png') # CREATE STATICTEXT AT POINT (20, 20) self.st = wx.StaticText(self.pnl, id = 1, label ="This is StaticText", pos =(20, 20), size = wx.DefaultSize, style = 0, name ="statictext") self.SetSize((350, 250)) self.SetTitle('wx.Button') self.Centre() def main(): app = wx.App() ex = Example(None) ex.Show() app.MainLoop() if __name__ == '__main__': main() Output Window: Comment More infoAdvertise with us Next Article wxPython - StaticText() constructor in wx.StaticText R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Python wxPython-StaticText Practice Tags : python Similar Reads wxPython - StaticLine() constructor in wx.StaticLine 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 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 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 - Wrap() function in wx.StaticText() In this article we are going to learn about Wrap() function associated with wx.StaticText class of wxPython. Wrap() functions wraps the controls label so that each of its lines becomes at most width pixels wide if possible (the lines are broken at words boundaries so it might not be the case if word 1 min read wxPython - Create() function in wx.StaticText In this article we are going to learn about Create() associated with wx.StaticText class of wxPython. A static text control displays one or more lines of read-only text. Create() function is used for two step creation of static text. It takes attributes of statictext as arguments. Syntax: wx.StaticT 1 min read Like