[wxPython-users] get wxListCtrl from wxListItem?

Rich Shepard rshepard at appl-ecosys.com
Tue Jan 2 10:21:18 PST 2007


On Tue, 2 Jan 2007, Pangborn, Andrew (ext. 324) wrote:

> Hopefully I'm just missing something obvious in the API...but how can I
> obtain a reference to the wxListCtrl from a 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

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863




More information about the wxpython-users mailing list