Skip to main content
Participating Frequently
June 11, 2010
Question

DropDownList prompt text color over

  • June 11, 2010
  • 1 reply
  • 1680 views

How do you set the prompt text color for a DropDownList in the over state.

The DropDownListButtonSkin has an over state so I can set anything to do with the button in this skin.

However, the prompt does not belong to the button but to the DropDownList itself. The DropDownList skin does not have an over state.

I am trying to create a UI where the prompt color and style changes as the user mouses over the DDL but I can't see how to do this.

This topic has been closed for replies.

1 reply

Participant
February 10, 2011

Hi,

Did you ever manage to solve this? I'm having exactly the same problem

Many thanks in advance

Chris

Participating Frequently
February 14, 2011

No, I never did solve this.

I think the way to do it is to create your own drop down list component. It wouldn't be that hard. In the end though I decided I had more pressing issues to resolve and I would get back to this when I had a chance.

Sorry this isn't much help. You never know someone might pipe up with an easier solution.

regards

Chris

August 1, 2011

I know it's an old thread, but I have a solution that will not involve making a custom component that extendsthe the DropDownList.

You can set a conditional property value for the labelDisplay based on the button's currentState:

(in your custom skin file - other properties omitted just for ease ov viewing)

<s:Button id="openButton" />


<s:Label id="labelDisplay"

    color="{(openButton.currentState == 'over') ? '#FF0000' : '#000000'}" />

Alternatively, you can do this with the styleName property and set a whole bunch changes at once via CSS.

Hope that helps someone stuck in the same situation out there.