如何显示的图标和文字的WinForms ListView的时候查看样式设置为详细信息? [英] How to show icons and text in Winforms ListView when View style is set to Details?

查看:107
本文介绍了如何显示的图标和文字的WinForms ListView的时候查看样式设置为详细信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想有两列这样的:

I just want to have 2 columns like:

Item                Value
[icon] Gold         10
[icon] Silver       2
[icon] Iron         1

这可能吗?或者我需要有另一列的图标?

Is this possible? Or do I need to have another column for the icons?

推荐答案

查找 SmallImageList 的文档的ListView 控制和的ImageIndex ImageKey 的属性的ListViewItem 类。

Look the documentation for the SmallImageList of the ListView control and the ImageIndex and ImageKey properties of the ListViewItem class.

http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.smallimagelist.aspx

这篇关于如何显示的图标和文字的WinForms ListView的时候查看样式设置为详细信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆