Python - AddCheckTool() function in wxPython Last Updated : 15 May, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article we are going to learn about AddCheckTool() in wx.ToolBar class of wxPython. AddCheckTool() function is used to add check tools. A checktool is a kind of toggle button. A checktool have a on and off state. Syntax : wx.ToolBar.AddCheckTool(self, toolId, label, bitmap1, bmpDisabled=NullBitmap, shortHelp="", longHelp="", clientData=None) Parameters : Parameter Input Type Description toolid int An integer by which the tool may be identified in subsequent operations. label string The string to be displayed with the tool. bitmap1 wx.bitmap The primary tool bitmap. bmpDisabled wx.bitmap The bitmap used when the tool is disabled. shortHelp string This string is used for the tools tooltip. longHelp string detailed string associated with tool. clientData PyUserData An optional pointer to client data which can be retrieved later using GetToolClientData. Return Type : wx.ToolBarToolBase Code Example: Python3 1== import wx class Example(wx.Frame): global count count = 0; def __init__(self, *args, **kwargs): super(Example, self).__init__(*args, **kwargs) self.InitUI() def InitUI(self): pnl = wx.Panel(self) self.toolbar = self.CreateToolBar() # create check toolusing AddCheckTool() function rtool = self.toolbar.AddCheckTool(12, 'CheckTool', bitmap1 = wx.Bitmap('/Desktop/wxPython/right.png'), bmpDisabled = wx.Bitmap('/Desktop/wxPython/wrong.png')) self.toolbar.Realize() self.SetSize((350, 250)) self.SetTitle('Simple toolbar') self.Centre() def main(): app = wx.App() ex = Example(None) ex.Show() app.MainLoop() if __name__ == '__main__': main() Output : unchecked : checked : Comment More infoAdvertise with us Next Article Python - AddCheckTool() function in wxPython R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Practice Tags : python Similar Reads wxPython | EnableTool() function in wxPython In this article we are going to learn about EnableTool() function of wx.ToolBar class of wxPython. It is another important function in wx.Toolbar class. EnableTool() function is used to enable or disable a particular tool in Toolbar. It takes 'enable' bool parameter which is when true enable the too 2 min read wxPython | FindControl() function in Python In this particular article we are going to learn about FindControl() function of wx.ToolBar class of wxPython. FindControl() function is used to returns a pointer to the control identified by id or None if no corresponding control is found. It takes only one parameter 'id'. Syntax : wx.ToolBar.FindC 2 min read Python - Create() function in wxPython In this particular article we are going to learn about Create() function present in wx.Frame class. Create function is similar to Frame() constructor of wx.Frame class. Create function is used in two-step frame construction. Syntax : wx.Frame.Create(parent, id=ID_ANY, title="", pos=DefaultPosition, 1 min read wxPython | Exit() function in wxPython In this article we are going to learn about wx.Exit() which is a inbuilt parent function present in wxPython.Exit() function exits application after calling wx.App.OnExit . Should only be used in an emergency: normally the top-level frame should be deleted (after deleting all other frames) to termin 1 min read wxPython| FindById() function in python In this article we are going to learn a simple function that is FindById() in wx.ToolBar class of wxPython. FindById is a simple function and returns a pointer to the tool identified by id or None if no corresponding tool is found. FindById() takes only single parameter that is id of a particular to 2 min read Like