wxPython - SetToolDisabledBitmap() function in wx.ToolBar Last Updated : 05 Jan, 2023 Comments Improve Suggest changes Like Article Like Report In this article, we are going to learn about SetToolDisabledBitmap() function associated with the wx.ToolBar class of wxPython. SetToolDisabledBitmap() function sets the bitmap to be used by the tool with the given ID when the tool is in a disabled state. This can only be used on Button tools, not controls. It takes two arguments id and bitmap. Syntax: wx.ToolBar.SetToolDisabledBitmap(Self, id, bitmap) Parameters: ParameterInput TypeDescriptionidintID of the tool in question, as passed to AddTool .bitmapwx.BitmapBitmap to use for disabled tools. Code Example 1: 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.toolbar = self.CreateToolBar() td = self.toolbar.AddTool(1, 'right', wx.Bitmap('right.png')) # set disabled bitmap for tool with id = 1 self.toolbar.SetToolDisabledBitmap(id = 1, bitmap = wx.Bitmap('wrong.png')) self.toolbar.Realize() self.Bind(wx.EVT_TOOL, self.OnOne, td) self.SetSize((350, 250)) self.SetTitle('Undo redo') self.Centre() def OnOne(self, e): # disable tool self.toolbar.EnableTool(toolId = 1, enable = False) # Realize() called to finalize new added tools self.toolbar.Realize() def OnQuit(self, e): self.Close() def main(): app = wx.App() ex = Example(None) ex.Show() app.MainLoop() if __name__ == '__main__': main() Output: Before clicking tick tool: After clicking tick tool: Comment More infoAdvertise with us Next Article wxPython - SetToolDisabledBitmap() function in wx.ToolBar R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Practice Tags : python Similar Reads wxPython - SetToolNormalBitmap() function in wx.ToolBar In this article we are going to learn about SetToolNormalBitmap() function associated with the wx.ToolBar class of wxPython. SetToolNormalBitmap() is used to set the bitmap to be used by the tool with the given ID. This can only be used on Button tools, not controls. It takes two parameters that are 1 min read wxPython - SetToolBitmapSize() function in wx.ToolBar In this article we are going to learn about SetToolBitMapSize() function associated with the wx.ToolBar class of wxPython. Sets the default size of each tool bitmap. The default bitmap size is 16 by 15 pixels. It takes only size as parameter. Syntax: wx.ToolBar.SetToolBitmapSize(self, size) Paramete 2 min read wxPython - SetToolLongHelp() function in wx.ToolBar In this article we are going to learn about SetToolLongHelp() function associated with the wx.ToolBar class of wxPython. SetToolLongHelp() sets the long help for the given tool. SetToolLongHelp() takes toolId and helpString as arguments. Syntax: wx.ToolBar.SetToolLongHelp(self, toolId, helpString) P 1 min read wxPython - SetToolShortHelp() function in wx.ToolBar In this article we are going to learn about SetToolShortHelp() function associated with the wx.ToolBar class of wxPython. SetToolShortHelp() simply sets the short help for the given tool. It takes two parameters that are, toolId and helpString(new short help string). Syntax: wx.ToolBar.SetToolShortH 1 min read wxPython - SetTooPacking() function in wx.ToolBar In this article we are going to learn about the function SetToolPacking() function associated with the wx.ToolBar class of wxPython. SetToolPacking() function sets the value used for spacing tools. The default value is 1. It takes only packing as a parameter. Syntax: wx.ToolBar.SetToolPacking(self, 2 min read Like