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/wl开发者_JS百科DnV.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!
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
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
精彩评论