Hi Richard,
Thank you for your patience.
From your update, we could understood that you want to detect when the TreeMenuItem get right clicked and active context menu. For this requirement, you can use MouseClick event of particular TreeMenuItem and check for right button, it will detect that particual item has been right clicked or not. Similary, you can activate the Contextmenu for that particular menuitem using the following code:
Code:[C#]
private void TreeMenuItem1_MouseClick(object sender, MouseEventArgs e)
{
//detect whether the menuitem has been right clicked
if (e.Button == MouseButtons.Right)
{
// Activate the contextmenu strip
contextMenuStrip.Show(Cursor.Position);
}
}
|
Please try this suggestion and let us know if it is helpful.
Regards,
Vijayalakshmi VR