I need to display a grid of icons to allow a user to select one. The only way I can think of doing this is with a ListView in Small Icons view, which works, but not as I need. The problem is that the width of each item is too big. For example, the ListView is filled using this code:
for(int i = 0; i < Constants.IconNames.Length; i++) {
ListViewItem itm = new ListViewItem();
itm.ImageIndex = i;
itm.Tag = i;
lstIcon.Items.Add(itm);
if(eventObject.Icon == i) {
itm.Selected = true;
}
}
IconNames is an array of icon names, which are resx resources, and used to fill the small image list for the ListView.
However, as the screenshot shows, the items don't have a settable width property. Is there any way around this?
for(int i = 0; i < Constants.IconNames.Length; i++) {
ListViewItem itm = new ListViewItem();
itm.ImageIndex = i;
itm.Tag = i;
lstIcon.Items.Add(itm);
if(eventObject.Icon == i) {
itm.Selected = true;
}
}
IconNames is an array of icon names, which are resx resources, and used to fill the small image list for the ListView.

However, as the screenshot shows, the items don't have a settable width property. Is there any way around this?