hi, i have this problem with wx.toolbook :
this is the first page class :
class newPanel(wx.Panel):
def __init__(self, Parent):
wx.Panel.__init__(self,Parent,id = -1)
self.SetBackgroundColour('yellow')
frame = wx.Frame(None,size=(400,400),pos=(500,300))
toolbook = wx.Toolbook(frame,-1, style=wx.BK_LEFT)
il = wx.ImageList(32, 32)
bmp = wx.Image(r'c:\python26\img.png',wx.BITMAP_TYPE_PNG).ConvertToBitmap()
index = il.Add(bmp)
toolbook.AssignImageList(il)
toolbook.AddPage(newPanel(toolbook), 'xxxx', index)
------------------------
the 'img.png' is 32 * 32 but when i run the module it says :
assertion failed in wx.toolbar.Realize()...invalid toolbar button bitmap...
so whats the problem? the wx.Toolbook example in the wxpython demo is basically the same.