This is a migrated thread and some comments may be shown as answers.

Treeview DropHighlight

0 Answers 146 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Cesar
Top achievements
Rank 1
Cesar asked on 21 Aug 2014, 05:22 PM
When I stop to select the node, is shaded. 

This time, I do the dragdrop from the ListView to Treeview. 

In return the default backcolor of treeview node.





RadTreeNode _previousNode = null;

    private void tvwExplorer_DragOver(object sender, DragEventArgs e)
    {
      if (this._previousNode != null)
      {
        this._previousNode.BackColor = SystemColors.HighlightText;
        this._previousNode.ForeColor = SystemColors.ControlText;
      }

      Point pt = ((RadTreeView)sender).PointToClient(new Point(e.X, e.Y));      
      RadTreeNode tn = this.tvwExplorer.GetNodeAt(pt);
      if (tn != null)
      {
        tn.BackColor = SystemColors.Highlight;
        tn.ForeColor = SystemColors.HighlightText;
      }
      this._previousNode = tn;
    }




No answers yet. Maybe you can help?

Tags
Treeview
Asked by
Cesar
Top achievements
Rank 1
Share this question
or