Popmenu
-
Hi all experts,,,, i have a problem,that i have developed a module(window application) in which there is a tree control.In tree control there are items in nodes of tree control.I want to select the item and do right click on that item and i got a popmenu.means that as the menu we use in our common applications which contain cut,copy etc. Plz help me as soon as possible. With regards Ishtiaq Ahmed
-
Hi all experts,,,, i have a problem,that i have developed a module(window application) in which there is a tree control.In tree control there are items in nodes of tree control.I want to select the item and do right click on that item and i got a popmenu.means that as the menu we use in our common applications which contain cut,copy etc. Plz help me as soon as possible. With regards Ishtiaq Ahmed
Do as under: 1. In the designer mode, drag a ContextMenu control from the ToolBar to the Form (on which your TreeView control is placed). It is named as ContextMenu1. 2. Add items (as per your requirement) to this ContextMenu instance in the space provided therein (with the prompt of "Type here") as you would while building a normal menu. 3. In the designer mode itself, now select your instance of TreeView control and in its Properties window, select the ContextMenu property and assign the value of the aforesaid instance "ContextMenu1" which you have just designed. 4. Now, just compile and run it. When you right-click on a node, you'll see a popup menu with the items you just placed as above. 5. For adding functionality to the menu items in the aforesaid ContextMenu, use the eventhandler for the click event of the particular menu item.