I have a wx.ListCtrl in wx.LC_REPORT style. I would need to have different font styles in a single wx.ListItem.
More specifically, I have a string item in which some part of the string should be bold.
The only code I found so far is:
item = listCtrl.GetItem(1)
font = item.GetFont()
font.SetWeight(wx.FONTWEIGHT_BOLD)
item.SetFont(font)
listCtrl.SetItem(item)
This just makes the whole row bold.
When I use
item = listCtrl.GetItem(1, 1)
instead of the first line it even doesn’t highlight the string item at position (1,1) at all, as I would have expected
Well, it seems that wx.ListCtrl doesn’t support to change the font of a single wx.ListItem in a list row, nor does it support different fonts within a single wx.ListItem.
Does anyone have an idea how to achieve different font styles in a single wx.ListItem of a wx.ListCtrl ?
Thanks,
Sam