2 Replies Latest reply on Jan 7, 2009 3:34 PM by justintoflex

    Changing RadioButton Label

    justintoflex
      I have a RadioButtonGroup with 6 RadioButtons and i would like to change the color of the label which the user selects. Is there a property/style that i can use to achieve this? Thanks...
        • 1. Re: Changing RadioButton Label
          rtalton Level 4
          I'm not going to lie to you, justintoflex. You are going to get stylish now. In fact, you are going to get into three styles: textRollOverColor, textSelectedColor, and the label's text color. All three come into play to successfully do what you want. Look into this example, change values, and you'll see what I mean. User interaction is never very simple.
          Enough talk. Let's get coding...
          • 2. Re: Changing RadioButton Label
            justintoflex Level 1
            Thanks rtalton.. This is exactly what i was looking for. I am glad and lucky that my very first post got answered by a real guru..
            I begin to understand what you mean when you say user interaction is never very simple..

            Earlier, since setting the color property for the RadioButton as below seemd to change the label color i thought that setting the color property in an event driven function would work.. but it did not.. What works is changing the color via setStyle

            <mx:RadioButton x="21" y="139" label="London" groupName="AnswersRadioGroup" id="A2" textRollOverColor="#0AF3CA" fontSize="12" color="#FFFFFF" iconColor="#0AF3CA" width="250"/>

            Thanks