0
votes

I'm trying to display a custom component i made inside a panel but when it renders the content is displayed outside of the panel box and there's no scrollbar.

In the designer i have this: http://i.stack.imgur.com/V99pG.jpg

  • a panel
  • an instance of myComponent inside the panel
  • a button that calls a method on myComponent that adds some controls into it

When i run the application and press the button the following is displayed: http://i.stack.imgur.com/wlDnV.jpg

See that the controls added dynamically in myComponent get over the panel's bottom line instead of showing only the visible part of the component and a scrollbar.

Any ideas how to fix it? Thanks!

2
Can we see some code, please? We can't know what you mean exactly by 'added dynamically' so there are just too many possibilities. - RIAstar
Seems that myComponent uses wrong layouting, please post the code of panel and myComponent. - Maxim Kachurovskiy

2 Answers

0
votes

You should fix your component custom component height according to your panel if you are using text area in your component for displaying text then you should the text area size

0
votes

I had your problem exactly gigkent. Turns out that it's to do with height settings. Apparently, setting the height to 100% is what messes it up.

I had an Accordion, a (several) NavigatorContent inside the accordion, a panel inside the navigator content, a scroller inside the panel with the scroller's viewport set to a VGroup declared outside all of that. The VGroup had clipAndEnableScrolling set to true.

Inside the VGroup, I had a form where I was dynamically adding radio buttons and my radio buttons were going off the screen. Setting the height of the VGroup to the height of the navigator content fixed the problem for me. I then had to set the width of the VGroup to the width of the Navigator Content -17 to compensate for the width of the scrollbar itself.

Here's the link that led me in the right direction. http://www.actionscript.org/forums/showthread.php3?mode=hybrid&t=191108