private Infragistics.Win.Appearance focusedAppearance = new Infragistics.Win.Appearance();private Infragistics.Win.Appearance notFocusedAppearance = new Infragistics.Win.Appearance();
this.notFocusedAppearance.BackColor = SystemColors.ControlDark;this.focusedAppearance.BackColor = SystemColors.Highlight;
this.ultraTree1.Override.SelectedNodeAppearance = this.focusedAppearance;this.ultraTree1.Enter += new EventHandler(this.ultraTree1_Enter);this.ultraTree1.Leave += new EventHandler(this.ultraTree1_Leave);this.ultraTree1.HideSelection = false;
private void ultraTree1_Leave(object sender, EventArgs e){ UltraTree tree = sender as UltraTree; tree.Override.SelectedNodeAppearance = this.notFocusedAppearance;}
private void ultraTree1_Enter(object sender, EventArgs e){ UltraTree tree = sender as UltraTree; tree.Override.SelectedNodeAppearance = this.focusedAppearance; }
Thanks Brian, that hit the spot. Is it safe to say there's no appearance property on the control itself for a node when it doesn't have focus? I liked how the Vista style works on this tree...when a tree loses focus, the previously selected node turns gray.