DEV ImageComboxEdit 使用
初始化:
?? ? ? ? ? ? ? ? ? ?DevExpress.XtraEditors.ImageComboBoxEdit imageComboBox=new ?DevExpress.XtraEditors.ImageComboBoxEdi();
?圖片容器:
?? ? ? ? ? ? ? ? ? ?DevExpress.Utils.ImageCollection imageCollection;
設置ImageComboxEdit 的圖片集合: ? ?
?? ? ? ? ? ? ? ? ? imageComboBox.Properties.SmallImages=imageCollection;
添加子項: ? ? ? ? ? ??
?? ? ? ? ImageComboBoxItem item = new ImageComboBoxItem();?? ? ? ? ? ? ?
? ? ? ? ?item.Value =“類似Tag功能”;?? ? ? ? ? ? ? ? ? ?
?? ? ? ? item.ImageIndex =(int型,在imageCollection中的索引);?? ? ? ? ? ? ? ?
?? ? ? ? item.Description = “顯示文本”;?? ? ? ? ? ?
? ? ? ? ?imageComboBox.Properties.Items.Add(item);
使用:
?? ? object value=?(imageComboBox.SelectedItem as ImageComboBoxItem).Value;
?? ? string ? text=(imageComboBox.SelectedItem as ImageComboBoxItem).Text;
轉載于:https://www.cnblogs.com/WuLong/archive/2011/04/08/2009781.html
總結
以上是生活随笔為你收集整理的DEV ImageComboxEdit 使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 不放弃WM,依旧开发WM应用
- 下一篇: 新手小白入门须知的SEO概念