V
vedrandekovic
Hello,
Here is example of my ListCtrl items with image:
( filebox1 is ListCtrl )
il = wx.ImageList(16,16)
images=["file1.png","folder.png"]
for i in images:
il.Add(wx.Bitmap(i))
img_list=filebox1.SetImageList(il, wx.IMAGE_LIST_SMALL)
j=1
unos1p=unos1.GetValue()
unos2p=unos2.GetValue()
unos3p=unos3.GetValue()
newftp=FTPHost(unos1p,unos2p,unos3p)
for item in newftp._dir('/'):
if item.split()[2]=="<DIR>":
index=filebox1.InsertStringItem(j,item)
filebox1.SetItemImage(index,2)
else:
index=filebox1.InsertStringItem(j,item)
filebox1.SetItemImage(index,1)
.......Then my program show all items and images with them, but the
problem is when I click on item
image of item disappere .Any idea?
Regards,
Vedran
Here is example of my ListCtrl items with image:
( filebox1 is ListCtrl )
il = wx.ImageList(16,16)
images=["file1.png","folder.png"]
for i in images:
il.Add(wx.Bitmap(i))
img_list=filebox1.SetImageList(il, wx.IMAGE_LIST_SMALL)
j=1
unos1p=unos1.GetValue()
unos2p=unos2.GetValue()
unos3p=unos3.GetValue()
newftp=FTPHost(unos1p,unos2p,unos3p)
for item in newftp._dir('/'):
if item.split()[2]=="<DIR>":
index=filebox1.InsertStringItem(j,item)
filebox1.SetItemImage(index,2)
else:
index=filebox1.InsertStringItem(j,item)
filebox1.SetItemImage(index,1)
.......Then my program show all items and images with them, but the
problem is when I click on item
image of item disappere .Any idea?
Regards,
Vedran