Applied patch [ 605189 ] add edit cancel notify to wxTreeEvent

Benjamin I. Williams

Currently there is no way of receiving notification
that a user cancelled an edit operation on a wxTreeCtrl
tree node label.

This patch adds a method "IsEditCancelled" to the
wxTreeEvent class. During an EVT_TREE_END_LABEL_EDIT
event, the programmer can now determine whether or not
the edit operation was cancelled by the user (by
pressing <ESC>).

This patch provides this implementation for both
wxMSW's wxTreeCtrl and the wxGenericTreeCtrl. Both
situations have been tested and work well.

The patch is not very invasive, and is much smaller
than I had expected.

Please see the relevent discussion on the wx-dev list
for more details.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-09-05 19:50:41 +00:00
parent 67a92fff32
commit dd23c25cde
7 changed files with 40 additions and 1 deletions

View File

@@ -74,6 +74,7 @@ wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
: wxNotifyEvent(commandType, id)
{
m_itemOld = 0l;
m_editCancelled = FALSE;
}
#endif // wxUSE_TREECTRL