.NET DropdownList 不同条目设置背景色和字体颜色
2013-08-08 15:06
447 查看
可以为dropdownlist设置不同的颜色,使用Attribute实现
ddlCompany.Items[1].Attributes.Add("style", "background-color: red");
ddlCompany.Items[2].Attributes.Add("style", "color: blue");
ddlCompany.Items[3].Attributes.Add("style", "color: yellow");
ddlCompany.Items[1].Attributes.Add("style", "background-color: red");
ddlCompany.Items[2].Attributes.Add("style", "color: blue");
ddlCompany.Items[3].Attributes.Add("style", "color: yellow");
相关文章推荐
- 应用键横竖屏切换;label中显示图片;不同类型设备适配的代码;UIWebView字体大小、字体颜色、背景色的设置;
- CSS:自定义链接样式(设置链接不同状态下的字体颜色/背景色等)
- eclipse设置护眼豆沙绿背景色以及字体颜色
- Toolbar 设置 menu 背景色、字体颜色以及弹出菜单不悬浮
- eclipse 字体颜色设置和背景色设置
- [置顶] UILabel的text设置不同颜色、字体
- MFC 可以设置背景色、字体、字体颜色、透明背景的 Static 静态文本控件
- iOS设置同一个Label的不同颜色的字体
- ios 设置label 不同字体大小颜色
- jxl操作excel(合并单元格,设置背景色,字体颜色)
- NSMutableAttributedString 设置不同颜色,不同字体的String
- 设置ActioinBar 的背景色以及Title的字体颜色
- iOS 开发~设置label上文字显示不同大小、颜色、字体类型
- markdown编辑器语法——文字颜色、大小、字体与背景色的设置(转)
- 设置linux下shell显示不同颜色的字体
- [置顶] csdn-markdown字体颜色和背景色设置
- 关于同一个lable不同字体和颜色的设置
- Jtextarea如何设置不同字体、颜色
- WinForm------GridControl中通过判断单元格文字显示不同字体颜色或背景色
- Eclipse详细设置护眼背景色和字体颜色并导出