From: Kevin A. <al...@se...> - 2004-09-12 17:08:26
|
On Sep 12, 2004, at 9:52 AM, Arthur Elsenaar wrote: > > 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 > In general, if the PythonCard component doesn't support one of the styles supported by the underlying wxPython control, you'll have to subclass the PythonCard component or just modify it to suit your purposes. PythonCard will look for components in a directory called appcomponents in your main application directory before it loads from the default component list, so that can be used to override which version of a component is used if you want something application-specific. If you decide to provide you're own about the only thing you need to provide in the subclass is a replacement __init__ method, so just copy that from the original and change the style. In the case of this style, it is something that PythonCard really should support, so I'll make appropriate modifications to the multicolumnlist component and post something here once that is done. ka |