Adding a constant interface to my component

I have a variable named child in which i put one of my customized components such as a Button, Image or Text etc. But i want to add a focus rectangle to my child component so that no matter what kind of component child is when i go with my mouse over it would get one effect and when i click it would get another effect.

So this is my class that is supposed to at least show my child component and then add those effects but i can’t even get it to show my component


    public class EditableObject extends UIComponent
    {
        public function EditableObject(obj:*)
        {
            addChild(obj);
        }
        
    }

This is how i used it:


var child:*;
child = new Button();
child.label = "test";
var child2:EditableObject = new EditableObject(child);
addChild(child2);

And all that i can see on my stage is a little dot :eye:. The button is not scaled to show the label and it’s width = height = 0. So i tried to use the measure() method from here (About the component instantiation life cycle - 12 b) yet i was not able to make it resize itself.

What am i doing wrong? How should I do it? How should I add those effects to my component? Is there a better way to do it?

[RIGHT]Thank you.
[/RIGHT]