From: Luis M. G. <lu...@gm...> - 2006-07-18 01:51:40
|
Hmmm... does it mean that I have to create "MultiColumnList1" as a = wx.ListCtrl from scratch? I tried that, but I get a "cannot import wxlistctrl" error message, = which I guess has something to do with the resource file... Anyway, how does the Multicolumn list sample work? It is a pure PythonCard app, with no wxPython tricks, and it works just = the way I want... ----- Original Message -----=20 From: Carl Wenrich=20 To: Luis M. Gonzalez=20 Sent: Monday, July 17, 2006 10:22 PM Subject: Re: [Pythoncard-users] MultiColumnList: How to set columns = width? I think you're trying to use a feature that PythonCard doesn't = support, which is why I suggested going directly to wx. I don't think = you can use the Pythoncard reference (self.component.<whatever>), you = have to use the wx.<component name>.SetColumnWidth(col, width). Of = course you must have the "import wx" line at the top of the file. "Luis M. Gonzalez" <lu...@gm...> wrote: Dear Carl, Thank you very much for your reply! Note that I had tried that already, but I'm affraid something is = wrong... In the wxPython demo, which has three columns, I saw three lines as = follows: self.list.SetColumnWidth(0, wxLIST_AUTOSIZE) self.list.SetColumnWidth(1, wxLIST_AUTOSIZE) self.list.SetColumnWidth(2, 100) Since my multicolumnlist is named MultiComlumnList1, I tried this: for i in range(len(columns)): self.components.MultiColumnList2.SetColumnWidth(i, = wxLIST_AUTOSIZE) but it didn't work. My question is: Since I have to resort to pure wxPython, what else should I do? I added these lines at the top: from wxPython.wx import * from wxPython.lib.mixins.listctrl import wxColumnSorterMixin Are they necessary? Since I'm referring to a wx.listCtrl instead of a MultiColumnList = one, how should I espress the "SetColumnWidth" method? Sorry for these very basic questions... Thanks again and best regards, Luis ----- Original Message -----=20 From: Carl Wenrich=20 To: Luis M. Gonzalez=20 Sent: Monday, July 17, 2006 4:36 AM Subject: Re: [Pythoncard-users] MultiColumnList: How to set = columns width? wx.listCtrl.SetColumnWidth(col, width) "Luis M. Gonzalez" <lu...@gm...> wrote:=20 Hi there, I have looked into the MultiColumnsList demo,=20 but I still can't figure out how to set columns widths so I can = display the full text of each one. Ideally, I'd like each column width to be as long as the longest = item contained in it. How can I do it? Any hint would be highly appreciated... Luis = -------------------------------------------------------------------------= Using Tomcat but need to do more? Need to support web services, = security? Get stuff done quickly with pre-integrated technology to make = your job easier Download IBM WebSphere Application Server v.1.0.1 based on = Apache Geronimo = http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 _______________________________________________ Pythoncard-users mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/pythoncard-users |