Quantcast
Channel: CSDN博客移动开发推荐文章
Viewing all articles
Browse latest Browse all 5930

.NET-TreeView选中节点失去焦点后颜色仍突出显示

$
0
0

TreeView选中节点失去焦点后颜色仍突出显示

        public TestLoseFocus()
        {
            InitializeComponent();
        }

        private void treeView1_DrawNode(object sender, DrawTreeNodeEventArgs e)
        {
            e.DrawDefault = true; //我这里用默认颜色即可,只需要在TreeView失去焦点时选中节点仍然突显  
        }

        private void TestLoseFocus_Load(object sender, EventArgs e)
        {
            treeView1.ExpandAll();
           treeView1.HideSelection = false;
            //自已绘制  
           this.treeView1.DrawMode = TreeViewDrawMode.OwnerDrawText;
            //this.treeView1.DrawNode += new DrawTreeNodeEventHandler(treeView1_DrawNode);  
        }
作者:daigualu 发表于2017/4/26 14:48:29 原文链接
阅读:119 评论:0 查看评论

Viewing all articles
Browse latest Browse all 5930

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>