1 Reply Latest reply on Nov 26, 2009 5:40 AM by BailHope

    Need help to create a custom control

    jibyalias

      Hi All

       

      I need to create a custom control in flex which is resizable and dragable. The thing is that I dont want extend any other control. It should look like a button and act like a label. It should be movable with the mose and resizable in horizontal way. How can I do this?

       

      I managed to create a button which extends the UIComponent. But the problem how will I make it resizable?

       

      I am new to flex, So any help or small examples would be of great help.

       

      Thanks

       

      Jiby

        • 1. Re: Need help to create a custom control
          BailHope

          When you say that it should 'act as a label', what do you mean exactly? Should it display text, support html, etc?

           

          Personally, just for starters, I would extend the label class instead of UIComponent. You can make a label act like a button thanks to the property 'buttonMode'. When set to true, you can click the label. That's two of your concerns covered right there.

           

          (You could also work the other way around and simply extend the Button control. I'm not sure if a Button supports htmltext though)

           

          As for the third concern, how to make it resizable, that's something else. I'm not really sure how to do that, but I'm sure someone else will be able to help you with that part!

           

          Good luck.