I am currently using UltraTree1_AfterSelect to see which node was selected to load different MDI child forms. The user clicks the node to load a MDI child form. Then they close the MDI child form but node they clicked before is still selected. Which means if they click on the same selected node again, the UltraTree1_AfterSelect event wont fire. So they have to click a different node, then click original node to load the MDI child form. Should I be using a different event?
Matt,
I am doing something similar with the UltraTree as renjitk and I'm already using the MouseDown event. It also fires the MouseDown event when the user expands or collapses the branch using the '+' and '-' buttons. I want to ignore the MouseDown event if the user is just clicking one of the buttons. How can I do that?
HI renjitk,
try using the MouseDown event, that will fire all the time. In that event use the UltraTree - GetNodeFromPoint method
here is a code snippet:
private void ultraTree1_MouseDown(object sender, MouseEventArgs e) { try { UltraTreeNode utn = ultraTree1.GetNodeFromPoint(e.X, e.Y); if (utn != null) { ultraLabel1.Text = DateTime.Now.ToLongTimeString(); } } catch { }
Here is a help link to the WinTree API:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/Infragistics2.Win.UltraWinTree.v8.1~Infragistics.Win.UltraWinTree.UltraTree_members.html
Here is a help link to the GetNodeFromPoint:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/Infragistics2.Win.UltraWinTree.v8.1~Infragistics.Win.UltraWinTree.UltraTree~GetNodeFromPoint.html