I looked over the ListCtrl code from the 2.5.2.8 demo program. I am trying to the up & down triangles seen when sorting a column. Everything works except that all rows in the first column show the up arrow triangle to the left of the string in that particular cell. This is how I load the data into the ListCtrl:
self.il = wx.ImageList(16, 16)
self.sm_up = self.il.Add(images.getSmallUpArrowBitmap())
self.sm_dn = self.il.Add(images.getSmallDnArrowBitmap())
self.SetImageList(self.il, wx.IMAGE_LIST_SMALL)
self.InsertColumn( 0, "Amount")
self.InsertColumn( 1, "Reason")
self.InsertColumn( 2, "Date")
self.InsertColumn( 3, "Notes")
myData = { 0 : ( "a", "Damaged", "10-15-2004", "Several pages were bent" ),
1 : ( "j", "Lost", "11-01-2004", "CD: Learning Spanish" ),
2 : ( "f", "Late", "10-29-2005", "Book: Harry Potter" ) }
for i in range(0,len(myData)):
self.InsertStringItem(i, myData[i][0])
self.SetItemData(i, i)
for j in range(1,len(myData[i])):
self.SetStringItem(i,j, myData[i][j])
self.itemDataMap = myData
listmix.ColumnSorterMixin.__init__(self, 4)
Since I am NOT using list.InsertImageStringItem, I do not understand how this is happening. Any ideas on what could be wrong?
Thanks,
-John
···
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/