Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
944
Events in a WinTree
posted

Hi,

I have a WinTree that is populated at runtime based on the users selection. Once populated the user of course selects a node, and then the program continues from there.

However, the issue I have is that I have used the example code from the Infragistics Help file to determine which node was selected and the event fires even when the user simply clicks on the Plus (+) to expand a node.

private void ultraTree1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
UltraTree tree;
tree = sender as UltraTree;

UltraTreeNode aNode;
aNode = tree.GetNodeFromPoint(e.X, e.Y);

if (aNode != null)
this.ultraTextEditor1.Text = aNode.Text; 
}

How can I determine the selected node with the event only firing when the user clicks on the node itself instead of on the expand/collapse node symbol.

 Cheers

Jason

Parents
  • 469350
    Offline posted

    Or you could just use the AfterActivate event to trap when the active node changes. This is better, because it will also respond when the selected node changed via the keyboard. 

Reply Children
No Data