From: Mattia B. <mb...@ds...> - 2002-03-31 20:42:12
|
> hello, > i have a treectrl which is editable... > > if i start edit an EVT_TREE_BEGIN_LABEL_EDIT is called... that's ok... > > if i press "ENTER" (without changing the name), a EVT_TREE_BEGIN_LABEL_EDIT > is called again... I don't see this > if i rename it and press "ENTER" an EVT_TREE_END_LABEL_EDIT and then an ok > EVT_TREE_BEGIN_LABEL_EDIT is called... not ok > in both cases, the treeItem stays in edit state... weird; are you using some EVT_CHAR handler? > i expect that if i press "ENTER" in edit state > (no mather if i renamed it or not) that an EVT_TREE_END_LABEL_EDIT ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ see documentation for wxTC::EditLabel > is called and the item is no longer in edit state > is this a mistake from my side or a bug? > any hints/ideas? Don't know: I am seeing the expected behaviour: - beginning editing sends a EVT_TREE_BEGIN - leaving the textctrl without changes ( via enter or mouseclick ) or pressing esc stops editing and does not generate any event - leaving the textctrl after some changes ( via enter or mouseclick ) stops editing and generates an EVT_TREE_END I reproduced this in the treectrl sample, adding two event handlers for EVT_TREE_BEGIN/END. As usual: minimal changes against some sample showing the problem are welcome. BTW: I am using Win2k Regards Mattia |