How to show a menu on a wxTreeCtrl item right click?? Topic is solved
How to show a menu on a wxTreeCtrl item right click??
Hi, I'd like to show a menu when the user right-click on a wxTreeCtrl item. Thank you for any help.
You should subclass the wxTreeCtrl and Implement a MouseEvent.
http://forums.wxwidgets.org/viewtopic.p ... rl+hittest
I mostly derive from wxTreeItemData a DataBase Class for my Tree,
and also give this class a virtual Method called makeMenu(wxMenu& menu).
So that I can define in every Nodeclass my own Menu.
http://forums.wxwidgets.org/viewtopic.p ... rl+hittest
I mostly derive from wxTreeItemData a DataBase Class for my Tree,
and also give this class a virtual Method called makeMenu(wxMenu& menu).
So that I can define in every Nodeclass my own Menu.
Hi thanks for your help.
The problem I have now is that I'd like to know which item I right clicked so when I press example "ACTIVATE" in the menu that pops up, the action is taken for the item that was right clicked.
event.GetItem() returns a wxTreeItemData item right? How can I convert this item into a MyTreeItemData class object?
The problem I have now is that I'd like to know which item I right clicked so when I press example "ACTIVATE" in the menu that pops up, the action is taken for the item that was right clicked.
event.GetItem() returns a wxTreeItemData item right? How can I convert this item into a MyTreeItemData class object?