Things behind:
I've an unbound tree. I have to mark an element after user press the right mouse key and display a context-menu. Somthing like in outlook afteryou press the right-mouse the element is marked with a slight-border. After mark another element regulary with the left mouse key the before slightly marked element lost the mark.The point is: The user sould see what element he has hit with right mouse
I assume you are referring to selecting nodes on a right-click; UltraTree does not do this through the user interface, but you can programmatically select a node on a right-click, as demonstrated by the following code sample:
private void ultraTree1_MouseDown(object sender, MouseEventArgs e){
UltraTree treeControl = sender as UltraTree;
if ( e.Button == MouseButtons.Right ) { UltraTreeNode nodeAtPoint = treeControl.GetNodeFromPoint( e.Location );
if ( nodeAtPoint != null ) this.SelectNode( nodeAtPoint, true ); }
}
private void SelectNode( UltraTreeNode node, bool activate ){ UltraTree treeControl = node.Control; if ( treeControl != null ) { if ( activate ) node.Control.ActiveNode = node;
node.Selected = true; }}
Yes and No. Right-Click (with Context-Menu) and set the hit Cell a to different back-color works fine.But going back to the defaul Back-color (resetting) after User click somewhere else is tricky.But i have to reset because otherwise all rigt-clicked cells would be marked with red as back-color (or what else as marked is used).