Treeview DropHighlight

1 posts, 0 answers
  1. Cesar
    Cesar avatar
    6 posts
    Member since:
    Apr 2014

    Posted 21 Aug 2014 Link to this post

    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;
        }




Back to Top