X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/45e6e6f8ab806b337dffeb3b52fec7eba3c845ef..6854c3fccb22b37bd8858dd3c3f01c968ee8608b:/samples/regtest/regtest.cpp diff --git a/samples/regtest/regtest.cpp b/samples/regtest/regtest.cpp index a7dc10aceb..4ead1d3df7 100644 --- a/samples/regtest/regtest.cpp +++ b/samples/regtest/regtest.cpp @@ -259,9 +259,10 @@ END_EVENT_TABLE() #if DO_REGTEST BEGIN_EVENT_TABLE(RegTreeCtrl, wxTreeCtrl) - EVT_TREE_DELETE_ITEM (Ctrl_RegTree, RegTreeCtrl::OnDeleteItem) - EVT_TREE_ITEM_EXPANDING(Ctrl_RegTree, RegTreeCtrl::OnItemExpanding) - EVT_TREE_SEL_CHANGED (Ctrl_RegTree, RegTreeCtrl::OnSelChanged) + EVT_TREE_DELETE_ITEM (Ctrl_RegTree, RegTreeCtrl::OnDeleteItem) + EVT_TREE_ITEM_EXPANDING (Ctrl_RegTree, RegTreeCtrl::OnItemExpanding) + EVT_TREE_ITEM_COLLAPSING(Ctrl_RegTree, RegTreeCtrl::OnItemExpanding) + EVT_TREE_SEL_CHANGED (Ctrl_RegTree, RegTreeCtrl::OnSelChanged) EVT_TREE_BEGIN_LABEL_EDIT(Ctrl_RegTree, RegTreeCtrl::OnBeginEdit) EVT_TREE_END_LABEL_EDIT (Ctrl_RegTree, RegTreeCtrl::OnEndEdit) @@ -713,7 +714,7 @@ void RegTreeCtrl::OnSelChanged(wxTreeEvent& event) void RegTreeCtrl::OnItemExpanding(wxTreeEvent& event) { TreeNode *pNode = GetNode(event); - bool bExpanding = event.GetKeyCode() == wxTREE_EXPAND_EXPAND; + bool bExpanding = event.GetEventType() == wxEVT_COMMAND_TREE_ITEM_EXPANDING; // expansion might take some time wxSetCursor(*wxHOURGLASS_CURSOR);