wxPython - GetLabel() function in wx.Button Last Updated : 18 Jun, 2020 Comments Improve Suggest changes Like Article Like Report In this article, we are going to learn about GetLabel() function associated with wx.Button class of wxPython. GetLabel() function is used to return the string label for the button. No parameters are required by GetLabel() function. Syntax: wx.Button.GetLabel(self) Parameters: No parameters are required in GetLabel() function. Return Type: string 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.pnl = wx.Panel(self) self.btn = wx.Button(self.pnl, label ='Button', pos =(20, 20), size =(100, 20)) # GET STRING LABEL ON BUTTON s = self.btn.GetLabel() # PRINT STRING LABEL print(s) 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() Console Output: Button Output Window: Comment More infoAdvertise with us Next Article wxPython - GetLabel() function in wx.Button R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Python wxPython-Button Practice Tags : python Similar Reads wxPython - SetLabel() function in wx.Button In this article we are going to learn about SetLabel() function associated with wx.Button class of wxPython. SetLabel() function is used to set the string label for the button. It takes a string parameter that is used as label for button. Syntax: wx.Button.SetLabel(self, label) Parameters: Parameter 1 min read wxPython - GetBitmap() function in wx.Button In this article we are going to learn about GetBitmap() function associated with wx.Button class of wxPython. GetBitmap() function is simply used to return the bitmap shown by the button. The returned bitmap may be invalid only if the button doesnât show any images Syntax: wx.Button.GetBitmap(self) 1 min read wxPython - GetAuthNeeded() function in wx.Button In this article we are going to learn about GetAuthNeeded() function associated with wx.Button class of wxPython. GetAuthNeeded() function is used to return True if an authentication needed symbol is displayed on the button. It takes no arguments. Syntax: wx.Button.GetAuthNeeded(self) Parameters: No 1 min read wxPython - GetDefaultSize() function in wx.Button In this article we are going to learn about GetDefaultSize() function associated with wx.Button class of wxPython. GetDefaultSize() function is used to return the default size for the buttons. It is advised to make all the dialog buttons of the same size and this function allows retrieving the (plat 1 min read wxPython - GetLabel() function in wx.MenuBar GetLabel() is another function present in wx.MenuBar class of wxPython. GetLabel() function is used to return the label of menu inside menu present in menubar. GetLabel() function only takes id as an argument and returns string Label of menu item. Syntax : wx.MenuBar.GetLabel(self, id) Parameters : 1 min read Like