【问题标题】:Fill images on listView space in Windows Form在 Windows 窗体中的 listView 空间上填充图像
【发布时间】:2017-07-15 13:36:10
【问题描述】:

是否可以在 listView 空间中填充图像,而不是每个图像在 listView 中占据单独的行。 我有一个 imageList 对象,它存储了所有需要的图像,并希望它填满 listView 中的空间。我已将 imageList 对象添加到 smallImageList 属性,并在拖放设计页面中将 View 属性更改为 smallIcon。使用下面的行来显示 listView。 listView1.Items.Add("",0); listView1.Items.Add("", 1); listView1.Items.Add("", 2); listView1.Items.Add("", 4);

谢谢

【问题讨论】:

  • @Bahrom 感谢您的建议,这对我有用。

标签: c# winforms listview imagelist


【解决方案1】:

ListView 控件无法做到这一点。相反,我建议使用 FlowLayoutPanel。您可以在其上添加图片框,将它们设置为相同的大小。

【讨论】:

    猜你喜欢
    • 2012-12-15
    • 1970-01-01
    • 2017-09-05
    • 1970-01-01
    • 1970-01-01
    • 2011-07-12
    • 1970-01-01
    • 1970-01-01
    • 2016-07-25
    相关资源
    最近更新 更多