[wxPython-users] wx.ListCtrl - Problem editing

Robin Dunn robin at alldunn.com
Fri Sep 1 08:36:29 PDT 2006


Nicolás Alejo Reynoso wrote:
> Robin Dunn wrote:
>> Nicolás Alejo Reynoso wrote:
>>> First of all "Hello list" and second "I'm a Spanish spoken so sorry 
>>> for my bad english".
>>>
>>> Well...
>>>
>>> I've created a wx.ListCtrl with wx.lib.mixins.listctrl.TextEditMixin.
>>> The problem when editing a cell is that the change is not showed 
>>> inmediatly. May be i'm doing something wrong but when i call 
>>> wx.EVT_LIST_END_LABEL_EDIT to show the content of that row the data 
>>> stay the same, now when i click and leave the same cell the change is 
>>> taken.
>>
>> What do you mean by "call wx.EVT_LIST_END_LABEL_EDIT" ?  Perhaps you 
>> should send a sample app to show us what you are trying to do.
>>
> 
> I mean when the "Event is activated" by leaving a cell (with a modified 
> value). In the OnEndEdit() method i print the data contained in that 
> column to stdout but this return the original data and not the last 
> change. Now... if i OnEndEdit the same item again the data returned it 
> is the modified.

The value hasn't been saved to the control yet because the control 
allows you to Veto() the change in the EVT_LIST_END_LABEL_EDIT event. 
It is only after this event has been handled and you don't veto the 
change that the new value is saved.  You can get access to the new value 
by calling event.GetText().


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





More information about the wxpython-users mailing list