PDA

View Full Version : Need Help with Right-Mouse Click and Context Menu



jadrake75
6 Dec 2008, 7:21 PM
Hi everyone,
I have a tree, and I have listener setup for Events.BeforeExpand and Events.BeforeCollapse to toggle the icons (for non-leaf items). I had a Events.Select setup when the user clicks the node in the tree (which triggers a filter on the results table to the right). I also have a contextMenu registered for modifying the tree items.

What I'd like to know is this. How can I determine that in the Events.Select event that the right-mouse button was clicked (thus cancelling any processing within my eventlistener - preventing the filter from firing). Also is there a way to detect a double click (or will I need to use a timer for this?)

The behavior I'd like is this:
* node expand/collapse using the try +/- icons
* single select node causes the filter to change
* double-click to cause the expand/collapse
* right-mouse click brings up the context menu.

Thanks
Jason