I have some set of png images, I'd like to use them as button icons in my toolbar (wx.ToolBar).
I do:
ID_DRAW_BUTTON = 100
self.toolbar = wx.ToolBar(self, -1, style=wx.TB_FLAT|wx.BORDER_RAISED)
draw_icon = wx.ArtProvider.GetBitmap("chart-icon", wx.ART_TOOLBAR, (16,16))
self.toolbar.AddTool(ID_DRAW_BUTTON, "Draw", draw_icon, shortHelpString="Draw Chart")
But it says
TypeError: in method 'ToolBarBase_DoAddTool', expected argument 4 of type 'wxBitmap const &'
although type of draw_icon is <class 'wx._gdi.Bitmap'>
So what should I do to use a png image as a toolbar button icon?