wxPython - Create() function in wx.StaticText Last Updated : 01 Mar, 2023 Comments Improve Suggest changes Like Article Like Report 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.StaticText.Create(parent, id=ID_ANY, label="", pos=DefaultPosition, size=DefaultSize, style=0, name=StaticTextNameStr) Parameters: ParameterInput TypeDescriptionparentwx.WindowParent window. Should not be None.idwx.WindowParent window. Should not be None.parentwx.WindowIDControl identifier. A value of -1 denotes a default value.labelstringText label.poswx.PointWindow position.sizewx.SizeWindow size.stylelongWindow style.namestringWindow name. Return Type: bool Code Example: Python3 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') self.st = wx.StaticText() # CREATE STATICTEXT AT POINT (20, 20) USING Create() FUNCTION self.st.Create(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 - Create() function in wx.StaticText R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Python wxPython-StaticText Practice Tags : python Similar Reads wxPython - Create() function in wx.StatusBar In this article, we are going to learn about Create() function associated with wx.StatusBar class of wxPython. Similar to StatusBar() constructor Create is used to add attributes to the status bar provided status bar variable should be initialized using StatusBar() constructor without any parameters 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 - 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 - GetLabel() function in wx.StaticText In this article we are going to learn about GetLabel() function associated with wx.StaticText class of wxPython. GetLabel() function is an important function it is used to get the string label associated with wxPython. It returns a string. No parameters are required in GetLabel() function. Syntax: w 1 min read wxPython | CreateTool() function in wx.Toolbar In this particular article we are going to learn about CreateTool() function in wx.ToolBar class in wxPython. CreateTool() function is a factory function to create a new toolbar tool. CreateTool() function only creates a tool which is further added using AddTool() function. Syntax: wx.ToolBar.Create 2 min read Like