简体   繁体   English

将每个ComboBox条目设置为不同的颜色

[英]Set every ComboBox entry in a different color

As you can see in the title, I would like to display my entrys in a way like this ComboBox . 正如您在标题中看到的那样,我想以这种ComboBox的方式显示我的条目。 But in my case it is enough to use white and grey. 但就我而言,使用白色和灰色就足够了。 The object which will be added should look like this: 将添加的对象应如下所示:

var item:Object = {label:"Dummy1", data:1 , "ValidItem":true};
if(item.ValidItem){setThisEnryInaDifferentColor();}

It should work like this pseudo code. 它应该像伪代码一样工作。

I´m using Flash with ActionScript 3 (no Flex, no AIR) 我在ActionScript 3中使用Flash(没有Flex,没有AIR)

您可以在所选项目中调整文本字段的backgroundColor属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM