I'm trying to populate a wxListCtrl with trivial file information, so
I've created the wxListCtrl with five columns (filename, path,
extension, date and size).
I'm also trying to use InsertImageStringItem to show the system icon
assigned to each file in the first column along with the file name,
but I'm facing some problems while trying to do this.
The code I'm trying to use (based on the Demo, snipped below) seems to
return a wxIcon, and it throws an exception, so that it also seems
that I can only put a wxBitmap inside the wxListCtrl.
ext="py"
self.il=wxImageList(16, 16)
...
fileType = wxTheMimeTypesManager.GetFileTypeFromExtension(ext)
info = fileType.GetIconInfo()
if info:
icon = self.il.Add(info[0])
self.list.InsertImageStringItem(x, data[0], icon)
So my question is: how can I put system icons inside a wxListCtrl?
Thanks in advance.
-- tacao