Colour or Font in wxpython.ListBox
I'm trying to change the colour or the font of a wx.listbox with
testfont = wx.Font(100, wx.MODERN, wx.NORMAL, wx.NORMAL, False, u'') self.SetItemFont(1, testfont)
but this doesn't work!! I looked in the Internet for a hint but haven't found anything.
If you Google around, you will find the following thread:
According to that thread, Robin Dunn (creator of wxPython) said you will need to override its Show method, like this:
def Show(self, show, attr): self.choice.Show(show) font = self.choice.Parent.GetFont() font.SetStyle(wx.FONTSTYLE_ITALIC) self.choice.SetFont(font) self.choice.SetBackgroundColour(wx.Colour(223, 223, 223))