Issue
Wxpython provides the following api to change wx.listbox items colour:
wx.ListBox.SetItemBackgroundColour(self, item, c)
and
wx.ListBox.SetItemForegroundColour(self, item, c)
For some reason this functions fail to do so in my linux and windows. Any one know why?
note that wx.ListBox.SetOwnBackgroundColor
works perfectly.
Solution
My guess is that it is a limitation of the native widget. I've seen several widgets that you cannot set the background or foreground color of because that widget just doesn't support it on that platform, but it DOES support it on other platform(s). You can ask over on the wxPython mailing list to make sure though. They have some of the primary wx devs there.
In the meantime, youmight look at VListBox or maybe switch to a ListCtrl.
Answered By - Mike Driscoll Answer Checked By - David Goodson (WPSolving Volunteer)