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 >> wxpython-users
wxpython-users
Re: [wxpython-users] Column widths in ListCtrl
by Jacek Poplawski other posts by this author
May 8 2008 6:40AM messages near this date
Re: [wxpython-users] Column widths in ListCtrl | Re: [wxpython-users] Column widths in ListCtrl
Hello Andrea,

On Thu, May 8, 2008 at 3:29 PM, Andrea Gavana <andrea.gavana@[...].com> 
wrote:

>  width can be a width in pixels


This is the way I was using it.


>  or wxLIST_AUTOSIZE (-1) or
>  wxLIST_AUTOSIZE_USEHEADER (-2). wxLIST_AUTOSIZE will resize the column
>  to the length of its longest item. wxLIST_AUTOSIZE_USEHEADER will
>  resize the column to the length of the header (Win32) or 80 pixels
>  (other platforms).


Thanks, I tried it and I have three comments:

1) SetColumndWidth must be called _after_ the list is filled with data, it
doesn't work correctly if I call it after column creation (probably it looks
at already created elements)

2) When the column is empty it sets is to 0 or something similiar, so it
doesn't look good

3) "the longest item" can be shorter than header, and the header can be
shorter than longest item

So how to use max(longest_item, header, const)?
Must I do it manually?

-- 
Free Software - find interesting programs and change them
NetHack - meet interesting creatures, kill them and eat their bodies
Usenet - meet interesting people from all over the world and flame them
Decopter - unrealistic helicopter simulator, get it from
http://decopter.sf.net
Thread:
Jacek Poplawski
Andrea Gavana
Jacek Poplawski
Andrea Gavana
Chester

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