I have been trying and trying and looking for ways/tutorials on how to add an image and text item to a imageComboBoxEdit I even read the documentation, but that didn't really help. I used an imageList then I added Resource.Black; to the imageList however when I try to add it to the text via this
private void AddItems(ImageComboBoxEdit editor, ImageList imgList)
{
for(int i = 0; i < 10 ; i++)
editor.Properties.Items.Add(new ImageComboBoxItem("Item " + (i + 1).ToString(), i, i));
editor.Properties.SmallImages = imgList;
}
then doing AddItems(imageComboBoxEdit1, imageList1);
it works fine for the text items but if I add a bunch of images to the ImageList
it just deletes all the text items and doesn't display items in it at all.
Bottom line: I NEED HELP! lol
Any and all help will be appreciated! :D thanks
With the designer:
Or in code, still assuming that the image list was added to the form and has an image in it.
ImageComboBoxItem someItem = new ImageComboBoxItem();
someItem.Description = "Text To Display";
someItem.ImageIndex = 0;
someItem.Value = 0;
imageComboBoxEdit1.Properties.Items.Add(someItem);
For this example, I just did this during form load.