码迷,mamicode.com
首页 > Windows程序 > 详细

winform listview默认第一项光标选中

时间:2015-03-06 10:00:11      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:

 if (this.lsvSortingHeadList.Items.Count > 0)
            {
                this.lsvSortingHeadList.Focus();
                this.lsvSortingHeadList.Items[0].Selected = true;
                //this.lsvSortingHeadList.HideSelection = false;
                //this.lsvSortingHeadList.FocusedItem = this.lsvSortingHeadList.Items[0];
                //this.lsvSortingHeadList.Items[0].Focused = true;
            }

只有上面的代码才能让第一项高亮并且有焦点选中。

winform listview默认第一项光标选中

标签:

原文地址:http://www.cnblogs.com/zfanlong1314/p/4317262.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!