I feel like this is a dumb issue, but I can’t figure it out.
I’m using Python 3.7 and wxPython 4.1.1a1, the first daily build following the 4.1.0 release on Windows 10 and MacOS 10.15.
I have a ListCtrl with the ColumnSorterMixin. I need to assign an ImageList so the ColumnSorter can show whether my columns are sorted ascending or descending.
My ListCtrl shows my first sort order image on each line in the ListCtrl. I can’t figure out how to make that image go away without losing my column sort indicators.
Sure, if I don’t call SetImageList(), I don’t get the image in the ListCtrl, but then I don’t get the sorter images in my columns.
I’ve tried using the following:
self.resultsList.InsertColumn(0, _("Word"))
self.resultsList.InsertColumn(1, _("Frequency"), wx.LIST_FORMAT_RIGHT)
self.resultsList.InsertColumn(2, _("Word Group"))
I thought that would not show images, but there they are. I’ve tried using:
info = wx.ListItem()
info.Image = -1
info.Mask = wx.LIST_MASK_TEXT
info.Text = _("Word")
self.resultsList.InsertColumn(0, info)
self.resultsList.InsertColumn(1, _("Frequency"), wx.LIST_FORMAT_RIGHT)
self.resultsList.InsertColumn(2, _("Word Group"))
I thought leaving images out of the mask might work. No luck. I still get the first image from the ImageList on each line in the ListCtrl.
I’ve tried messing with the ListCtrl demo along the lines above and can’t get rid of the happy little images there without losing the column sort images.
It would be fantastic if someone can tell me what I’m doing wrong and help me get rid of the images I don’t want and as far as I can tell don’t ask for.
Thanks in advance,
David