Search code examples
python-3.xwxwidgetslistctrlwxpython

wxPython (Python3) ListCtrl header with bold text/horizontal rules


I'm a newbie and making a simple ListCtrl. My first impression was that it looks good on GTK but not so good on windows. The headers didn't look outstanding from the list items, so I'm trying to make it look better. Right now it's something like this

        self.list = ListCtrl(self, tID, style=wx.LC_REPORT
                             | wx.BORDER_SUNKEN
                             | wx.LC_EDIT_LABELS
                             | wx.LC_SINGLE_SEL
                             )

My first attempt is to make header texts bold, OR create a horizontal rule that separate the header from the items (like in GTK version). I tried wx.LC_HRULES, but it only affects the items, not the header. Can you suggest a way to do this?

Thanks in advance


Solution

  • After some tinkering, I found a way to make the text bold. The answer is Ultimate Listctrl. It's a very flexible class with wonderful customizations.