wxPython - Disable Button Last Updated : 18 Jun, 2020 Comments Improve Suggest changes Like Article Like Report In this article we are going to learn about how can we disable a button present in a frame. Sometimes when we dont want user to press a button we can disable a button and the button become unclickable. In order to disable a button we can use Disable() function associated with wx.Button class of wxPython. Syntax: wx.Button.Disable(Self) Parameters: No parameters required in Disable() function. 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('download.jpg') # CREATE BUTTON AT POINT (20, 20) self.st = wx.Button(self.pnl, id = 1, label ="Button", pos =(20, 20), size =(100, 30), name ="button") # SET BUTTON DISABLED self.st.Disable() 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 Image: Comment More infoAdvertise with us Next Article wxPython - Disable Button R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Python wxPython-Button Practice Tags : python Similar Reads wxPython - Disable Radio button In this article we are going to learn about how can we disable a radio button present in a frame. Sometimes when we dont want user to press a button we can disable a button and the button become unclickable. In order to disable a button we can use Disable() function associated with wx.RadioButton cl 1 min read Disable Kivy Button In this article, we will learn how to disable a button in kivy, there are some places where we need to disable the buttons So in this article you will learn how to do that. Kivy Tutorial â Learn Kivy with Examples. The Button is a Label with associated actions that are triggered when the button is p 3 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 wxPython - Hide Radio Button In this article we are going to learn about that, how can we hide a radio button present on frame. We can hide a radio button using Hide() function. Hide() function takes no argument and hide the radio button window from the frame. Hide() is different from Drop() as it just hides the radio button an 1 min read Button in wxPython - Python In this article we are going to learn how can we add buttons to a frame in wxPython. This can be done by using the Button() constructor of wx.Button class. Following styles are supported in this class: wx.BU_LEFT: Left-justifies the label. Windows and GTK+ only.wx.BU_TOP: Aligns the label to the top 2 min read Like