Hello All,
I want to work with an editable ListCtrl (listctrl + TextEditMixin)
and save the modified values.When a cell has been modified by the user and only at that moment,
how can I do to know it and do what I want ie save the modified item
to a database for instance) ?
I looked at the TextEditMixin. The mixin opens and closes an editor,
but I wonder how I can catch when the editor is closed and on which cell.I would greatly appreciate any help that would avoid me going on
searching for something which is so basic.Thanks in advance
Dominique
Dominique,
I do something like this myself in one of my applications. It looks like I bind to EVT_LIST_ITEM_SELECTED to get the current cell. Here's the relevant portion from my handler:
self.currentItem = event.m_itemIndex
That gets the currently selected "cell", so to speak.
You can use EVT_LIST_BEGIN_LABEL_EDIT to catch begin editing event and EVT_LIST_END_LABEL_EDIT to catch the end edit, I think. That should get you started anyway.
Mike