2 Replies Latest reply on Jan 25, 2007 8:41 AM by ur_dtrain

    Expanding Flex Componenets

    JennHysuick Level 1
      Good Morning,

      I have expanded other components before, but only ones that already had a Text attribute to give them an HTMLText attribute. I don't think Radio Buttons have a Text attribute, so I need to be able to display their lable in an HTML Text format. Does anyone know how to do this? If I can't get it done, then my only other option is to do the button, and create a separate text field next to it and put the label in there, but I'd like to try to extend the component first if I can.

      Thanks in advance!

        • 1. Re: Expanding Flex Componenets
          peterent Level 2
          It might be easier to make a composite component that behaves like a radio button. Say a UIComponent with a RadioBox, sans label, and Text control for the label.
          • 2. Re: Expanding Flex Componenets
            ur_dtrain Level 1
            You can play with something like this:

            public class newRadioButton extends RadioButton{
            import mx.controls.RadioButton;
            import flash.text.TextField;

            public var label:TextField; // overwrite the existing label
            public function newRadio()
            // You may have to place the new label
            label.x = this.x + 25;
            label.y = this.y;
            override public function set label(value:Object):void{
            label.htmlText = value;
            override public function get label(value:Object):void{
            return label.htmlText;