首页 > Windows开发 > 详细

WinForm中ListView的使用

时间:2018-10-30 11:02:51      阅读:155      评论:0      收藏:0      [点我收藏+]
  • 每一行是一个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的使用

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!