Hi,
"NodeMouseClick" in Ultra Tree View for getting the Context menu strip.
M.
mansi,
You can use the contextmenu property of the tree itself if all you want to do is show a context menu for a right click on a node. If you are using columns in the tree (e.g., OutlookExpress style), you can set up a context menu for the editor control assigned to the column.
As far as working with a nodemouseclick, in a Tree_MouseDown event handler you can use a hittest as in this code:
Etc.
Hope this helps,
JC
I recommend using MouseUp rather than MouseDown. I think if you experiment with other applications you will find that context menus are always shown on MouseUp, not MouseDown. Using MouseDown can cause problems with mouse messages because the context menu eats the MouseUp and some controls will get confused when they get a MouseDown with no MouseUp.
Ok . but there is one problem about context menu and right click ..
when user do right click on node , node did not select .
user can select node only on left click :
how to select node with right click ?
tnx . Nenad
My setup is using a standard .Net context menu for the tree, not the form. Not sure why yours isn't working.
Have you checked some other settings, such as:
' Make the main tree fully editable by defaultMe.MyTree.ColumnSettings.AllowCellEdit = AllowCellEdit.FullMe.MyTree.Override.CellClickAction = CellClickAction.SelectNodeOnly
' Set Up Drag and Drop
I had to try different settings to get the behavior I wanted.
I am using Mouse down event for displaying the context menu strip on a tree node.I dont want the Context menu to appear on the + node.how can i avoid that?
Thanks,Mansi