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.

Answers


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)) 

Need Your Help

Share partition ubuntu and Windows

windows linux ubuntu filesystems operating-system

In order to have a partition accessible in both Ubuntu and Windows I had a drive formatted as fat32(or vfat) I just found out that it does not hold single files that are more than ~4.3Gb in size. Is

ValueError using sklearn and pandas for decision trees?

python scikit-learn decision-tree sklearn-pandas

I'm new to scikit learn and I just saw the documentation and a couple of other stackoverflow posts to build a decision tree.