Hi Dan,
> -----Original Message-----
> From: Dan Eloff [mailto:dan.eloff gmail.com]
> Sent: Monday, October 01, 2007 1:36 PM
> To: wxPython-users lists.wxwidgets.org
> Subject: Issues setting items for a multicolumn
listctrl
>
> Inserting items with:
>
> if col:
> self.InsertColumnItem(col, item)
> else:
> self.InsertItem(item)
>
> In a loop. The items have Text associated with them,
but once
> they've been added, only the first item, added via
InsertItem
> has Text. The others have u'' as the Text. I retain a
> reference to the actual ListItem object and I can still
call
> item.Text afterwards and verify that it has Text, but
the
> item in the ListCtrl does not.
>
> What's going on here?
>
> Thanks,
> -Dan
>
I use InsertStringItem() to insert an item and
SetStringItem() method to
put text into specific "columns" in the
wx.ListCtrl. The WIA book says
that InsertItem is used internally by the list control to
manage
information. I don't really understand it all, but I don't
think it's what
you want. It seems to retain previously created items in
memory and that's
why I assume you can query your text. If you have the book,
see page 403.
Mike
------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribe lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help lists.wxwidgets.org
|