Newbie wxPython ListCtrl Question

limodou limodou at
Thu Nov 17 02:06:39 CET 2005

2005/11/17, Todd7 <nospam at>:
> I am new to python and to wxWindows.  I have tried searching google,
> reading the documentation and trying to figure out some of the examples,
> but I am stumped as to how to get information out of a listctrl at a
> certain row and column.  I tried to write a simple example to learn to
> work with the listctrl as follows:

I'v made some helper function as that:

    def getRowText(self, index, col):
        if index >= 0:
            return self.list_ctrl_1.GetItem(index, col).GetText()
            return ''

    def getSelRowText(self, col):
        return self.getRowText(self.getSelection(), col)

    def getSelection(self):
        return self.list_ctrl_1.GetNextItem(-1, wx.LIST_NEXT_ALL,

You can just use self.getSelRowText(1) to gain the second column text
of selection row.
I like python!
My Blog:
NewEdit Maillist:

More information about the Python-list mailing list