Newbie problem with wxListCtrl

Frank Miles fpm at u.washington.edu
Sun Oct 15 17:27:40 EDT 2000


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.

Thanks again...

	-frank

-- 



More information about the Python-list mailing list