【发布时间】:2019-02-15 10:10:59
【问题描述】:
我正在尝试制作带有选项的列表视图。选项之一是更改图标大小。我试图做出这样的改变:
this.listview1.LargeImageList.ImageSize = this.list.SmallImageList.ImageSize = new Size(h, w);
这改变了图像大小,但图像消失了。谁能帮帮我?
【问题讨论】:
我正在尝试制作带有选项的列表视图。选项之一是更改图标大小。我试图做出这样的改变:
this.listview1.LargeImageList.ImageSize = this.list.SmallImageList.ImageSize = new Size(h, w);
这改变了图像大小,但图像消失了。谁能帮帮我?
【问题讨论】:
请看下面的链接,我觉得应该有用:
How to Change existing Imagelist image size of Listview
使用以下代码。它对我有用:
listView1.View = View.LargeIcon;
ImageList iList = new ImageList();
iList.ImageSize = new Size(128, 128);
iList.ColorDepth = ColorDepth.Depth32Bit;
iList.Images.Add(Properties.Resources.x64_Clear_icon);
listView1.LargeImageList = iList;
【讨论】: