I tried to use the following codes to populate a combo box with an enumeration type I defined (RtfColor enumeration for named color such as Red, Blue ...):
However, I found that the FontDialog (.Net class) uses a similar combobox with additional color icon next to the named color string. I like this way better than just a list of enumeration values. The color icon shows exactly what the color is.Code:this.comboBackColor.DataSource = Enum.GetValues(typeof(RtfColor));
Is there any way to do that in C#? That is, a list of icons with associated strings (named color string).


Reply With Quote


Bookmarks