Hello,
I'm trying to add icons to a tree ctrl class I've created with this code:
dirIcon =im1 = -1
self.ilist = wxImageList(16, 16)
im1 = self.ilist.Add(treeIcons.getFolder1Bitmap())
self.SetImageList(self.ilist)
but I get the following error when I use a test icon from the demo folder images.py (which I renamed to treeIcons)
What am I doing wrong? I copied the code straight from the demo.
Guy
File "C:\Documents and Settings\redarch\Desktop\TCE\rfatree.py", line 12, in __init__
im1 = self.ilist.Add(treeIcons.getFolder1Bitmap())
File "C:\Documents and Settings\redarch\Desktop\TCE\treeIcons.py", line 3614, in getFolder1Bitmap
return wxBitmapFromImage(getFolder1Image())
File "E:\PYTHON22\lib\site-packages\wxPython\image.py", line 387, in wxBitmapFromImage
val = apply(imagec.wxBitmapFromImage,_args,_kwargs)
wxPyAssertionError: C++ assertion "wxAssertFailure" failed in e:\projects\wx\src\msw\bitmap.cpp(507): invalid image