- self.list.InsertColumn(0, "Artist")
- self.list.InsertColumn(1, "Title", wxLIST_FORMAT_RIGHT)
- self.list.InsertColumn(2, "Genre")
+ if 0:
+ # for normal simple columns, you can add them like this:
+ self.list.InsertColumn(0, "Artist")
+ self.list.InsertColumn(1, "Title", wxLIST_FORMAT_RIGHT)
+ self.list.InsertColumn(2, "Genre")
+ else:
+ # but since we want images on the column header we have to do it the hard way:
+ info = wxListItem()
+ info.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_IMAGE | wxLIST_MASK_FORMAT
+ info.m_image = -1
+ info.m_format = 0
+ info.m_text = "Artist"
+ self.list.InsertColumnInfo(0, info)
+
+ info.m_format = wxLIST_FORMAT_RIGHT
+ info.m_text = "Title"
+ self.list.InsertColumnInfo(1, info)
+
+ info.m_format = 0
+ info.m_text = "Genre"
+ self.list.InsertColumnInfo(2, info)
+
+