如题

解决方案 »

  1.   

    一个比较“笨”的方法就是,在TreeView的AfterSelect事件函数里,这样:
    private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
    {
    e.Node.BackColor = SystemColors.Highlight;
    }
      

  2.   

    将HideSelection设置为false。正解
      

  3.   

    HideSelection达不到(不能完全达到)楼主的要求的,去试试就知道了(MSDN里也有写)。
      

  4.   

    HideSelection使失去焦点时选中项为灰色
    虽然不是蓝色
    也差不多了
      

  5.   

    设置 AfterSelect后如果再有其他的选择则以前的底色还是不会变化的
      

  6.   

    该怎么写才能像Nettransport的ListView控件一样,最后被选择的Item一定是SystemColors.HighLight呢