# Show component in right before , during and after resize

**URL:** <https://forum.kirupa.com/t/show-component-in-right-before-during-and-after-resize/306014>\
**Category:** Uncategorized\
**Created:** [March 8, 2010, 10:17am UTC](https://forum.kirupa.com/t/show-component-in-right-before-during-and-after-resize/306014 "2010-03-08T10:17:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephgravity](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@stephgravity](https://forum.kirupa.com/u/stephgravity)\
**Post date:** [March 8, 2010, 10:17am UTC](https://forum.kirupa.com/t/show-component-in-right-before-during-and-after-resize/306014/1 "2010-03-08T10:17:24Z")

</div>

I have a component that extends linkButton, I set it percentWith = 100% (and suppose it’s measuredWidth = 55), I add it to a component which has a width = 20 (I want to see only the icon):

```auto

setStyle("textAlign", "left");
percentWidth = 100;

```

With this done it works perfectly fine.

To the same parent of this linkbutton, I want to add a Panel containing a button, but the button should show always in the right (the parent has the property that on mouse over it resize from size=20 to size = 200 - the parent measuredWidth)  
If I set the style :

```auto

panel.setStyle("horizontalAlign", "right");
panel.percentWidth = 100;

```

- I normally should see the button in the right, correct? but the problem is that when the parent is small (=20), the button is not visible , while when the resize effect start, I’m starting to see this button only when it’s x \> 20 (or it looks like this);  
Can anybody tell me what I am doing wrong? or is it just another strange behaviour of action script?

Thanks,  
Stephanie
