Click here to Skip to main content
15,890,670 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Use this combobox [^]

There is a line:
C#
imagedComboBox1.Items.Add(new ComboBoxItem("Error", SystemIcons.Error.ToBitmap()));


Icon taken from the system. How to make that icon was taken from imageList1 ??
Posted

1 solution

Try:
int myIndex = 7; // whatever is your preferred Image index in the ImageList.
imagedComboBox1.Items.Add(new ComboBoxItem("Error", imageList1.Images[myIndex]));
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900