I am trying to use the wxLC_ICON style with the wxListCtrl, but the icons
never display. Below is a test code snippet. Anyone see what I am doing
wrong?
from wxPython.wx import *
class CTest( wxFrame ):
def __init__(self):
wxFrame.__init__(self, NULL, -1, "test" )
il = wxImageList(16, 16)
idx1 = il.Add( wxBitmap('inboxs.bmp', wxBITMAP_TYPE_BMP) )
list = wxListCtrl(self, -1, style = wxLC_ICON )
list.SetImageList(il, wxIMAGE_LIST_NORMAL)
list.InsertImageStringItem(0, "test label", idx1)
class CApp( wxApp ):
def OnInit(self):
frame = CTest()
frame.Show(true)
self.SetTopWindow(frame)
return true
app = CApp(0)
app.MainLoop()