Newbie problem with wxListCtrl

Tom nospam at nospam.com
Mon Oct 16 10:48:50 EDT 2000


"Frank Miles" <fpm at u.washington.edu> wrote in message
news:8sd7gc$8bcc$1 at nntp6.u.washington.edu...
> In article <DajG5.9330$N%1.4696194 at news3.rdc1.on.home.com>,
> Tom <nospam at nospam.com> wrote:
> >Frank,
> >
> >You need to insert items, as well as setting the item's string.
> >
> >So, before your line:
> >             self.lc.SetStringItem(i, 0, "%d" % i)
> >Add a line like this:
> >            self.lc.InsertStringItem(i, label);
> >
> >Where label is a string that serves no purposes (doesn't get displayed)
that
> >I've deteremined.  It's all the same on the Win32 api - this is a common
> >mistake.
>
> Thanks!  That does it (at least for the entries, column widths are of
> lesser importance).
>
> My only complaint (whine?) now is that the documentation for this is
pretty
> much missing.  Didn't see any reference to this on the wxpython mailing
> lists, either.
>
> Ah, but now a search yields something from the Hammond book on programming
> python for win32, Ch 20:
>
> "For the report mode, you insert an item for the first
>                  column and then set values for the remaining columns."
> [ shows some code, too ]
>
> Too bad the book focuses on win32 stuff, and relatively little about
> wxpython, AFAICT.

Yes, that's a good book, but not the place one would expect to find the
answer to a wxPython question.  I'm surprised you didn't find anything
searching on the mailing list archive - that's usually the best bet.

Places I look for wxPyton info:
- wxPython demo
- wxWindows docs
- mailing list archives
- Win32 Platform SDK on MSDN

Tom.





> Thanks again...
>
> -frank
>
> --





More information about the Python-list mailing list