Winform-ListViewItem的Text 与其 SubItems[0].Text关系

ListViewItem的属性Text 与 SubItems[0].Text 的关系是:同一个

ListViewItem item = new ListViewItem();
item.Text = "thinpro";
// item.SubItems[0].Text = "thinpro";
listView1.Items.Add(item);

如上代码中 

item.Text = "thinpro" 效果和 item.SubItems[0].Text = "thinpro" 相同

在为ListView填充数据时

使用循环遍历时使用SubItems填充数据更方便

posted on 2018-02-08 15:11  ThinPro  阅读(397)  评论(0)    收藏  举报

导航