From: Alex T. <al...@tw...> - 2004-09-12 11:26:49
|
At 23:38 11/09/2004 -0700, Kevin Altis wrote: >MultiColumnList wraps wx.ListCtrl so just look at that control in the >wxPython demo as well as the wxWidgets/wxPython documentation. Just use >the wxPython method calls for whatever you need to do. 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__ Note this is an initialization-time only setting, can't be changed once the list exists. [ Kevin - I tried adding this as an extra parameter and found there's still some things I don't know about resources :-) I'll email you off-list about it .... ] 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. |