X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5fd60e085ad8668e27203b1454a7fba5a03ef2e5..e45a6885492304586b481ee1dacdc1544533e731:/samples/treectrl/treetest.cpp diff --git a/samples/treectrl/treetest.cpp b/samples/treectrl/treetest.cpp index 4f3c978c76..813cd3b75a 100644 --- a/samples/treectrl/treetest.cpp +++ b/samples/treectrl/treetest.cpp @@ -9,11 +9,6 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ - #pragma implementation - #pragma interface -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -144,6 +139,9 @@ BEGIN_EVENT_TABLE(MyTreeCtrl, wxTreeCtrl) // so many differents ways to handle right mouse button clicks... EVT_CONTEXT_MENU(MyTreeCtrl::OnContextMenu) + // EVT_TREE_ITEM_MENU is the preferred event for creating context menus + // on a tree control, because it includes the point of the click or item, + // meaning that no additional placement calculations are required. EVT_TREE_ITEM_MENU(TreeTest_Ctrl, MyTreeCtrl::OnItemMenu) EVT_TREE_ITEM_RIGHT_CLICK(TreeTest_Ctrl, MyTreeCtrl::OnItemRClick)