- 1、本文档共10页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
c 设计带图标和自定义颜色的listbox(C designs ListBox with icons and custom colors).doc
c#设计带图标和自定义颜色的listbox(C# designs ListBox with icons and custom colors)
C# designs ListBox with icons and custom colors
The C# design, with icons and custom colors, is the key word for ListBox, C#, ListBox, and color,
In a peer-to-peer file transfer project, I need to display the real-time information of file transfer: transfer file list and the current file transfer, then I think of ListBox, but I used ListBox, I found it could not change the text color to control, so I want to expand out. ListBox control ------ListBoxEx.
My goal is to add icons to space and to change the text color of the control at any time. The class is derived from the ListBox
Public class ListBoxEx: ListBox {... }
For ease of operation, I designed a special class ListBoxEx for each item of ListBoxExItem
Public, class, ListBoxExItem {... }
To keep my control in line with the standard manipulation of WinForms standard controls, I redesigned two collection classes:
Public class ListBoxExItemCollection: IList, ICollection, IEnumerator {}
/ / this class compared to the standard ListBox ObjectCollection in this class as a Items attribute in ListBoxEx type
Public, class, SelectedListBoxExItemCollection:: IList, ICollection, IEnumerator{}
/ / this class compared to the standard ListBox SelectedObjectCollection in this class as a SelectedItems attribute in ListBoxEx type
See below the implementation of the two collection class:
The implementation of ListBoxExItemCollection: in order to achieve the set (Items) operation can be reflected to the ListBoxEx control so that such is only for ListBox Items (type ObjectCollection) made a layer of packaging, is that all the Items property in the ListBox as long as the parameters of type object are converted to ListBoxExItem, for example:
Public void Remove (ListBoxExItem item)
{
This._Items.Remove (item); //_Items is the ObjectCollection type
}
Public, void, Insert (int, index, ListBoxExItem, item)
{
This._Items.Insert (index, item);
}
Public int Add (ListBoxExIt
您可能关注的文档
- 可研报告-绿色安全食品流通体系项目.doc
- 桌面运维Helpdesk常用英语词.docx
- 2010年北京化学中考试题(Beijing chemistry entrance examination in 2010).doc
- 年级奥数与智能思维(下).doc
- 2018考研必背的10篇英语作文模板.doc
- MANUAL-PELOTòN-DE-FUSILEROS-CAP.-I,II,III-.doc
- 开发环境简介 第章 windows mobile发展简史 第章 net.doc
- 民商法必读书目(Required readings in civil and Commercial Law).doc
- 备考2017年职称英语考试 理工真题阅读理解中英文对照.docx
- 易错字音汇总(录自套高考及模拟试题).doc
文档评论(0)