wxPython - Change labels using button Last Updated : 10 May, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article we are going to learn how to make button interactive with the frame. In this article we will change the text label on the pressing button. So let's start with the steps. Step 1: Create a static text on the frame. Step 2: Add button to the frame. Step 3: Create event function for the button. Step 4: Add code to change text label in this function. Code : Python3 1== # import wxPython import wx class Example(wx.Frame): def __init__(self, *args, **kw): super(Example, self).__init__(*args, **kw) # function to get response after click def onButton(event): print("Button") st.SetLabel("GeeksforGeeks") # static text st = wx.StaticText(self, label ="Welcome to ") # create button button = wx.Button(self, wx.ID_ANY, 'Test', (10, 40)) # bind onButton() function with button button.Bind(wx.EVT_BUTTON, onButton) def main(): app = wx.App() ex = Example(None) ex.Show() app.MainLoop() if __name__ == '__main__': main() Output: 1. Before clicking: 2.After Clicking Comment More infoAdvertise with us Next Article wxPython - Change Button Label Font R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Practice Tags : python Similar Reads wxPython - Change Button Label Font In this article we are going to learn that how can we change the font of the label text present on the button present in the frame. We need to follow some steps as follows: Step 1: Create a wx.Font object. Step 2: Add different attributes of font in parameters like: family, style etc. Step 3: Set fo 1 min read wxPython - change size of Button In this article we are going to learn about SetSize() function associated with wx.Button class of wxPython. SetSize() function is simply used to change the size of the button present in the frame. SetSize function takes a wxSize argument to change the size of button. Syntax: wx.Button.SetSize(self, 1 min read wxPython - GetLabel() function in wx.Button 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 requi 1 min read wxPython - Change Size of Radio Button In this article we will learn to change size of a Radio Button. We will change the size of Radio Button using SetSize() function associated with wx.RadioButton class of wxPython. SetSize() function is simply used to change the size of the window of Radio Button in pixels. Syntax: wx.RadioButton.SetS 1 min read wxPython - Change font of Radio Button In this article we are going to learn that how can we change the font of the label text present on the radio button present in the frame. We need to follow some steps as follows: Step 1: Create a wx.Font object. Step 2: Add different attributes of font in parameters like: family, style etc. Step 3: 1 min read wxPython - Add Image in Button In this article we are going to learn that, how can we add image in a button. So first of all we will create a wx.Bitmap object and initialize with the image we want to add to button. After this we will use SetBitmap() function associated with wx.Button class of wxPython. SetBitmap() function takes 1 min read Like