1、先在工程中添加 ImageCollection控件: imageCollection1
2、绑定控件
chklistNames.HtmlImages = imageCollection1;
3、chklistNames中的CheckedListBoxControl 中AllowHtmlDraw属性设为true
chklistNames.AllowHtmlDraw = Default.Boolean.True;
4、图标转换为HTML
string imageStr = String.Format("image={0}", imageCollection1.images.InnerImages[0].Name);
5、添加图标
chklistNames.Items.Add(imageStr + "节点名");
6、具体使用节点名时,还需要将图标字符串去掉
string nodeName = chklistNames.Items[Index].ToString().Substring(imageStr.Length);
标签:imageCollection1,chklistNames,dev,imageStr,添加,CheckedListBoxControl,图标 From: https://www.cnblogs.com/hebdzw/p/18079746