WinForm中ListView的使用

2021-07-04 01:06

阅读:280

标签:col   ext   orm   let   data   宽度   info   样式   led   

  • 每一行是一个ListViewItem对象,每一项是一个ListViewSubItem对象
  • 样式
    • 整行选择:this.lvDataSourceSearchHistory.FullRowSelect = true;
    • 文本是否可编辑:this.lvDataSourceSearchHistory.LabelEdit = false;
    • 隐藏列头:this.lvDataSourceSearchHistory.HeaderStyle = ColumnHeaderStyle.None;
    • 边框样式:this.lvDataSourceSearchHistory.BorderStyle = BorderStyle.Fixed3D;
  • 绑定数据
    • this.lvDataSourceSearchHistory.Columns.Clear();
    • this.lvDataSourceSearchHistory.Columns.Add("Search Text");
    • this.lvDataSourceSearchHistory.Columns.Add("Delete Button");
    • 固定宽度:this.lvDataSourceSearchHistory.Columns[0].Width = 440;
    • 固定宽度:this.lvDataSourceSearchHistory.Columns[1].Width = 15;
  • 自定义显示每一行每一项的显示

 

WinForm中ListView的使用

标签:col   ext   orm   let   data   宽度   info   样式   led   

原文地址:https://www.cnblogs.com/wyp1988/p/9875350.html


评论


亲,登录后才可以留言!