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; }
只有上面的代码才能让第一项高亮并且有焦点选中。
时间: 2024-12-21 23:06:31