From: Arthur E. <ar...@ia...> - 2004-09-12 16:52:42
|
On Sep 12, 2004, at 13:37, Alex Tweedly wrote: > I looked into the first question (Can I have a multicolumn list with > no headers ?) > > There is a parameter to pass into wxListCtrl, but there's no > equivalent in PythonCard. We'd need to add a "heading" field to the > resource, and then use it to control whether or not wx.LC_NO_HEADER > was passed in to wx.ListCtrl.__init__ ah, good it's in wxPython. > Note this is an initialization-time only setting, can't be changed > once the list exists. does this mean one cannot do this in a pythoncard script, only in the framework because of the initialization order? Thanks, I'll try your suggestion. Arthur > There's a cheap hack that I used to test how it might work - use the > existence (or not) of columnheadings to determine whether or not the > list should have headings. Not the right long term answer, but a quick > easy way to get it if you need it soon .... > in components/multicolumnlist.py, at line 95, add > > if aResource.columnHeadings == []: > rules |= wx.LC_NO_HEADER > > so you will then have > if aResource.rules: > rules = wx.LC_HRULES | wx.LC_VRULES > else: > rules = 0 > > if aResource.columnHeadings == []: > rules |= wx.LC_NO_HEADER > > self._rules = aResource.rules > etc. > > -- Alex. |