我希望有两列,就像这样:
Item Value
[icon] Gold 10
[icon] Silver 2
[icon] Iron 1
这个可能吗?还是我需要为图标创建另一列?
请查看 ListView
控件的 SmallImageList
,以及 ListViewItem
类的 ImageIndex
和 ImageKey
属性的文档。
http://msdn.microsoft.com/zh-cn/library/system.windows.forms.listview.smallimagelist.aspx
在第一列中,标准的ListView支持图像,但对于其他列,您将不得不在互联网上搜索。如果我记得正确,有几个codeproject控件可以在ListView的其他列(SubItems)中启用图像。