wxPython - SetToolNormalBitmap() function in wx.ToolBar Last Updated : 16 Feb, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 id and bitmap. Syntax: wx.ToolBar.SetToolNormalBitmap(self, id, bitmap) Parameters: ParameterInput TypeDescriptionidintID of the tool in question, as passed to AddTool .bitmapwx.BitmapBitmap to use for normals tools. 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.toolbar = self.CreateToolBar() td = self.toolbar.AddTool(1, 'right', wx.Bitmap('right.png')) # set disabled bitmap for tool with id = 1 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): # set new bitmap of tool with id = 1 self.toolbar.SetToolNormalBitmap(id = 1, bitmap = wx.Bitmap('wrong.png')) # 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 tool: After clicking tool: Comment More infoAdvertise with us Next Article wxPython - SetToolBitmapSize() function in wx.ToolBar R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Practice Tags : python Similar Reads 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 - SetToolDisabledBitmap() function in wx.ToolBar 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 c 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 - 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 - InsertTool() function in wx.ToolBar In this article we are going to learn about InsertTool() function associated with wx.ToolBar class of wxPython. InsertTool() function is the new style of inserting a tool in the toolbar as a particular position. InsertTool() takes arguments associated with a tool as its parameters. Syntax: wx.ToolBa 2 min read wxPython - SetToolSeparation() function in wx.ToolBar In this article we are going to learn about SetToolSeparation() function associated with the wx.ToolBar class of wxPython.SetToolSeparation() sets the default separator size. The default value is 5. SetToolSeparation() function only takes separation() as parameters. Syntax: wx.ToolBar.SetToolSeparat 1 min read Like