Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Show ContextMenuStrip on empty tree

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
Longmountain



Joined: 02 Aug 2006
Posts: 4

PostPosted: Wed Aug 02, 2006 12:37 pm    Post subject: Show ContextMenuStrip on empty tree Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Aug 02, 2006 11:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group