From: Liam C. <cy...@gm...> - 2005-04-10 19:59:50
|
Hello again,=20 Feeling kind of silly, just looked more closely at MCL, and found lines=20 330-338 under the method=20 _setColumnHeadings(self, aList): elif w =3D=3D 3 and \ isinstance(aList[0][0], StringType) and \ isinstance(aList[0][1], IntType) and \ isinstance(aList[0][2], IntType): flag =3D 0 for i in xrange(numcols): if aList[i][1] !=3D wx.LIST_AUTOSIZE: flag =3D 1 self.InsertColumn(i, aList[i][0], format=3DaList[i][2], width=3DaList[i][1]= ) So, I get the feeling that if I create my ColumnHeadings as a list of [=20 "Column name", x, y] where x and y are both integers, then it'll come through to this=20 InsertColumn method... But, what values are legitimate values? If x and y have to be ints, how doe= s=20 that fit in with InsertColumn? I'm used to wx.LIST_AUTOSIZE and so forth. Those isinstance()'s in the elif clause are a bit confusing actually.... Not overly much documentation on InsertColumn at wxpython.org<http://wxpython.org>either. :( Any help would be gratefully appreciated,=20 Liam Clarke On Apr 10, 2005 10:12 PM, Liam Clarke <cy...@gm...> wrote: >=20 > Hi there,=20 >=20 > Sorry to resurrect an old topic, but just working with the multi-column= =20 > list. >=20 > I have the column headings stored in the resource file, but I want to=20 > change how the column headings are formatted. AFAIK, in wxPython you can= =20 > only set formatting when calling wx.ListCtrl.InsertColumn, which is I=20 > believe what MultiColumnList (MCL) does for my column headings upon=20 > instantiation. >=20 > What I was wondering was would it be possible to have a optional attribut= e=20 > for that list like=20 > 'format': None in the resource file? Then you could add in the basic=20 > formats (list_left) if you needed them. >=20 > I dunno, MultiColumnList is so easy to use compared to the wxPython=20 > ListCtrl, so, in my pursuit of maximum effect for minimum effort, I'd rat= her=20 > avoid wx stuff as much as possible. I'm having nightmares after trying to= =20 > figure out how to use wx.DC's effectively.=20 >=20 > Alternatively, would it be possible to stick a method in MCL to=20 > effectively, destroy the existing MCL and create it again, but with=20 > formatting?=20 >=20 > I know that it would be a 95% un-needed method/attribute, so I'm asking= =20 > 'just in case' someone's poking at MCL and feels creative. >=20 >=20 > Regards,=20 >=20 >=20 > Liam Clarke >=20 > --=20 > 'There is only one basic human right, and that is to do as you damn well= =20 > please. > And with it comes the only basic human duty, to take the consequences.'= =20 >=20 --=20 'There is only one basic human right, and that is to do as you damn well=20 please. And with it comes the only basic human duty, to take the consequences.' |