ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pythoncard
pythoncard
Re: [Pythoncard-users] More questions
by Jussi Salmela other posts by this author
Nov 25 2006 7:03AM messages near this date
[Pythoncard-users] More questions | [Pythoncard-users] Beginning Questions
Greg Lindstrom wrote:
>  headers (I define them in ColumnHeaders, but  when I add data the 
>  headers go away.
Are you doing this in the resource editor? I enter a list of strings 
into the field 'columnHeadings':
          ['Name', 'Age', 'Address']
and enter data into the field 'items':
          [['John', '21', 'London'], ['George', '34', 'Liverpool'], 
['Paul', '63', 'Paris']]
and everything is otherwise OK, but the columns change to be too narrow. 
That is maybe what you meant with this:
>    Also, I can't seem to set the column widths to a fixed width.
I started looking for info to solve this problem through the usual route:
    - Pythoncard Sample Launcher,
    - wxPython Demo
    - wxWidgets reference (installed with wxPython)

The last one helped: its documentation of the wxListCtrl widget gives 
the function SetColumnWidth, which I called in the on_initialize method 
like this:
        self.components.MultiColumnList1.SetColumnWidth(0,70)
        self.components.MultiColumnList1.SetColumnWidth(1,45)
to set the 'Name' and 'Age' column widths.

BTW1. Both the Pythoncard and the wxPython demos are a great source of 
information because you are able to browse the source code to see how 
the widgets are used and read the comments. In this particular case the 
Pythoncard demo has a demo called 'multicolumnexample' that at the start 
of its source has some documentation on the multicolumlist component.

BTW2. wxPython is built on the wxWidgets package. Thus the wxWidgets 
reference is applicable to Pythoncard also. Reading it may be a little 
rough at first because the documentation is made on the C++ level. After 
a while, though, you get used to how to apply mutatis mutandis the info 
in Pythoncard.

HTH,
Jussi

-- 
Jussi Salmela
http://personal.inet.fi/cool/operator/


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Pythoncard-users mailing list
Pythoncard-users@[...].net
https://lists.sourceforge.net/lists/listinfo/pythoncard-users
Thread:
Greg Lindstrom
Jussi Salmela

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved