I have a tree view control and I want to add a right-click menu. The items in the menu will change based on the item selected. (I will create multiple context menus and decide at run-time which one to display.)
I see that .Net calls this type of menu a “context menu” and the VS help text has code showing how to create it and to attach an event to its selection. I can not, however find code to assign it to the treeview. How does my program know to assign a given context menu to a given control? That’s the question
In VB or VBA I’d just write code to the right-click event but there is no such thing with the treeview (or other controls it seems).
Does anyone have code samples that show how to do this? This context menu will have items such as Add, Delete, Copy, etc.
Thnx, Deb