wxlistctrl text edit ?

I want to be able to edit the text in one of the right columns by clicking on it, but wxlistctrl only allows you to edit the first column in each row. I found a mixin class called "wxListCtrlTextEdit", but am unsure how to use it. Does anyone know how to add the wxListCtrlTextEdit to wxPython and use it? Or how to edit specific fields in the wxListCtrl without this class?

tyson wrote:

I want to be able to edit the text in one of the right columns by clicking on it, but wxlistctrl only allows you to edit the first column in each row. I found a mixin class called "wxListCtrlTextEdit", but am unsure how to use it. Does anyone know how to add the wxListCtrlTextEdit to wxPython and use it? Or how to edit specific fields in the wxListCtrl without this class?

It's in the wx.lib.mixins.listctrl module. It's docstring says this:

     """
     A mixin class that handles enables any text in any column of a
     multi-column listctrl to be edited by clicking on the given row
     and column. You close the text editor by hitting the ENTER key or
     clicking somewhere else on the listctrl. You switch to the next
     column by hiting TAB.

     To use the mixin you have to include it in the class definition
     and call the __init__ function::

         class TestListCtrl(wx.ListCtrl, TextEdit):
             def __init__(self, parent, ID, pos=wx.DefaultPosition,
                          size=wx.DefaultSize, style=0):
                 wx.ListCtrl.__init__(self, parent, ID, pos, size, style)
                 TextEdit.__init__(self)

     Authors: Steve Zatz, Pim Van Heuven (pim@think-wize.com)
     """

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!