开发者

Flex: setting disabled color of dropdownlist

开发者 https://www.devze.com 2023-04-04 18:02 出处:网络
I would like to disable aspark drop down list but do not want to have the alpha color over it. I want the color to stay exactly the same. (by user requirements)

I would like to disable a spark drop down list but do not want to have the alpha color over it. I want the color to stay exactly the same. (by user requirements)

I have this code but the disabled color is still the standard disabled color.

mydropdown.enabled = false; mydropdown.setStyle("disabledColor", 0xFFFFFF);

Am I missing something?

Thanks Ri开发者_JAVA技巧chard


DropDownList is different from DateField as it is spark vs mx. So you will want to set a custom skinClass for the DropDownList.

Create a copy of DropDownListSkin, Then remove the alpha.disabled=".5" from the top tag.

mydropdown.setStyle("skinClass", MyDropDownSkin);

Edit Adding an alternative You can also wrap the dropdown in a group with the style disabledAlpha set to 1

<s:Group disabledAlpha="1" enabled="false">
    <s:DropDownList />      
</s:Group>
0

精彩评论

暂无评论...
验证码 换一张
取 消