Hi.
I have created one application in C#.Net. and i take one navigation panel- in that i take - Tree view and after running that application when i right click on that tree view so it should ask me for delete or open so please help if any body has a source code then please help me .
Thanks and Regards.
Kamelsh P. nikam
Loading
Dorababu MekaPosted Jan 11, 2011, 9:06 AM
Place a context menu from the tool box name the items as you like and handle mousedown event for treeview as follows
private void tvwACH_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
if (tvwACH.HitTest(e.Location).Node != null)
{
contextMenu.Show(tvwACH, e.Location);
}
}
You should also handle the remaining code as you like when you select the options from Context menu