View previous topic :: View next topic |
Author |
Message |
Longmountain
Joined: 02 Aug 2006 Posts: 4
|
Posted: Wed Aug 02, 2006 12:37 pm Post subject: Show ContextMenuStrip on empty tree |
|
|
I'm evaluating the VirtualTree and have some questions.
Is there a way to show the ContextMenuStrip, which is assigned to the VirtualTree, when the tree is empty? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Aug 02, 2006 11:06 pm Post subject: |
|
|
The default context menu should be displayed when you click on an empty tree - so this looks like a bug. We will fix this in the next minor release, but in the meantime you can work around the issue by handling OnMouseDown event and displaying the context menu yourself as shown below:
Code: | private void _virtualTree_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
_virtualTree.ContextMenuStrip.Show(_virtualTree, e.X, e.Y);
}
} |
_________________ Infralution Support |
|
Back to top |
|
|
|