[wxPython-users] get wxListCtrl from wxListItem?
Pangborn, Andrew (ext. 324)
axp at qvii.com
Tue Jan 2 10:47:06 PST 2007
I'm using multiple list controls as elements on a CustomTreeCtrl...so I would still need some way of determining what listctrl the Listitem belonged to. I am able to get the value from the listCtrl cell that was edited with event.GetText(), its just a matter of getting a reference to the proper python data object so that I can persist changes to my model. It's pretty easy for me to tack on a pyData object to the listctrl, but I don't really know how to tack a pyData object onto the listitem. I'm using listCtrl.SetStringItem, which seems to create the ListItem internally without returning a reference.
-----Original Message-----
From: Rich Shepard [mailto:rshepard at appl-ecosys.com]
Sent: Tuesday, January 02, 2007 1:21 PM
To: wxPython-users at lists.wxwidgets.org
Subject: Re: [wxPython-users] get wxListCtrl from wxListItem?
Andrew,
Using GetItem() returns a number; the position of that item in the list. I
think that you're looking for GetItemText(). For example, you might have a
pair of statements like these:
item = self.lc.GetItem()
whoami = self.lc.GetItemText(item)
The first identifies which string in the list has been selected, the second
provides the associated string.
Rich
More information about the wxpython-users
mailing list