I have a listCtrl that allows you to edit a column, when the user
places a value of zero and click on the other hand the row is deleted.
Now what you can not get is that when the user place the value of zero
and push enter disappears of row. I tried with GetKeyCode and
EVT_LIST_KEY_DOWN but do not get the keycode to enter. I attach a
sample code.
EVT_LIST_KEY_DOWN is for events that happen when the list ctrl has the focus. When it has an active text editor then that widget has the focus, not the list ctrl. If all you need is notification that the editing has been completed then you can use EVT_LIST_END_LABEL_EDIT.
···
On 11/24/09 9:06 PM, Jair Gaxiola wrote:
Hi,
I have a listCtrl that allows you to edit a column, when the user
places a value of zero and click on the other hand the row is deleted.
Now what you can not get is that when the user place the value of zero
and push enter disappears of row. I tried with GetKeyCode and
EVT_LIST_KEY_DOWN but do not get the keycode to enter. I attach a
sample code.
On Wed, Nov 25, 2009 at 6:17 PM, Robin Dunn <robin@alldunn.com> wrote:
EVT_LIST_KEY_DOWN is for events that happen when the list ctrl has the
focus. When it has an active text editor then that widget has the
focus, not the list ctrl. If all you need is notification that the
editing has been completed then you can use EVT_LIST_END_LABEL_EDIT.
Ok, I tried with EVT_LIST_END_LABEL_EDIT but I need is notification
that the edition has been completed when the user press enter after
of change the value. I fail to capture the value of the keycode of
enter.
On Nov 26, 5:03 pm, Jair Gaxiola <jyr.gaxi...@gmail.com> wrote:
Hi,
On Wed, Nov 25, 2009 at 6:17 PM, Robin Dunn <ro...@alldunn.com> wrote:
> EVT_LIST_KEY_DOWN is for events that happen when the list ctrl has the
> focus. When it has an active text editor then that widget has the
> focus, not the list ctrl. If all you need is notification that the
> editing has been completed then you can use EVT_LIST_END_LABEL_EDIT.
Ok, I tried with EVT_LIST_END_LABEL_EDIT but I need is notification
that the edition has been completed when the user press enter after
of change the value. I fail to capture the value of the keycode of
enter.
On Mon, Nov 30, 2009 at 9:04 AM, Mike Driscoll <kyosohma@gmail.com> wrote:
On Nov 26, 5:03 pm, Jair Gaxiola <jyr.gaxi...@gmail.com> wrote:
Hi,
On Wed, Nov 25, 2009 at 6:17 PM, Robin Dunn <ro...@alldunn.com> wrote:
> EVT_LIST_KEY_DOWN is for events that happen when the list ctrl has the
> focus. When it has an active text editor then that widget has the
> focus, not the list ctrl. If all you need is notification that the
> editing has been completed then you can use EVT_LIST_END_LABEL_EDIT.
Ok, I tried with EVT_LIST_END_LABEL_EDIT but I need is notification
that the edition has been completed when the user press enter after
of change the value. I fail to capture the value of the keycode of
enter.
Any suggestions?
You'll probably need to bind an event handler to the underlying
control to get that. Something like this in your original event
handler should do it:
I use EVT_LIST_END_LABEL_EDIT , but can not get the new value of the
cell, if not the old. Nor will remove the row that contains a zero
value but the last row, where I'm placing the index of current item.
Then what I'm doing wrong. Any tips?
On Mon, Nov 30, 2009 at 4:13 PM, Jair Gaxiola <jyr.gaxiola@gmail.com> wrote:
HI
On Mon, Nov 30, 2009 at 9:04 AM, Mike Driscoll <kyosohma@gmail.com> wrote:
On Nov 26, 5:03 pm, Jair Gaxiola <jyr.gaxi...@gmail.com> wrote:
Hi,
On Wed, Nov 25, 2009 at 6:17 PM, Robin Dunn <ro...@alldunn.com> wrote:
> EVT_LIST_KEY_DOWN is for events that happen when the list ctrl has the
> focus. When it has an active text editor then that widget has the
> focus, not the list ctrl. If all you need is notification that the
> editing has been completed then you can use EVT_LIST_END_LABEL_EDIT.
Ok, I tried with EVT_LIST_END_LABEL_EDIT but I need is notification
that the edition has been completed when the user press enter after
of change the value. I fail to capture the value of the keycode of
enter.
Any suggestions?
You'll probably need to bind an event handler to the underlying
control to get that. Something like this in your original event
handler should do it:
I use EVT_LIST_END_LABEL_EDIT , but can not get the new value of the
cell, if not the old. Nor will remove the row that contains a zero
value but the last row, where I'm placing the index of current item.
Then what I'm doing wrong. Any tips?
I changed my code, but later to edit and delete the column when the
value is equal to zero, the next column of the next row gets the value
zero, it deletes origin the value . I do not understand what the
reason. I attach my code, for anyone that can help me.