// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
- #pragma implementation
- #pragma interface
-#endif
-
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// 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)