i think it has to do with the accordion rendering its height according to its first child, there is a parameter that lets you change this, but cannot remember it at the moment... Anybody else?
On Thu, Nov 20, 2008 at 7:37 PM, Derrick Anderson < [EMAIL PROTECTED]> wrote: > good tip, thanks- i've already noticed that panels and canvases act very > differently here- switching the nested component from a panel to a canvas > automatically fixed the scrolling issue with the accordion. > > thanks, > d. > > > On Thu, Nov 20, 2008 at 12:49 PM, Tracy Spratt <[EMAIL PROTECTED]>wrote: > >> Containers have their scrollPolicy="auto" by default. Anytime I have >> scroll issues, which is almost always, I start by setting the scrollPolicy >> (horizontal and Vertical) to "off" on ALL containers at every level. Then I >> enable scrolling on the one I want. >> >> >> >> Theoretically, one could control scrollbars by thoroughly understanding >> the Flex layout process, but it gets pretty complex with nested containers. >> There are also default paddings and gaps and so forth that make it hard to >> get the sizing of everything correct. And it is sometimes hard to tell >> which dimension is the problem, because one scroll bar can cause the >> appearance of the other dimension scrollbar. But with scrolling off, you >> can see pretty quickly when something is clipped, and adjust accordingly >> >> >> >> Tracy >> >> >> ------------------------------ >> >> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On >> Behalf Of *Derrick Anderson >> *Sent:* Thursday, November 20, 2008 11:49 AM >> *To:* [email protected] >> *Subject:* [flexcoders] nested containers, forcing inner contents to >> scroll >> >> >> >> hi everyone, >> >> i have a few parts of my app where there are composite components that >> create their own children, when i use an accordion for example (but it >> happens in many places), and create the children with script- the container >> holding the accordion scrolls, not the accordion children themselves- for >> example: >> >> <mx:Panel width="100%"> >> <mx:Accordion id="questionAccordion" width="100%" height="100%"> >> >> </mx:Accordion> >> </mx:Panel> >> >> i'm expecting the accordion to take up the full available space in the >> panel. >> >> then i add children to the accordion >> >> private function init():void >> { >> for(var i:Number=0;i<page.questions.length;i++){ >> var q1:Question = new Question(); >> q1.question = page.questions[i]; >> q1.editable = editable; >> q1.percentWidth = 100; >> questionAccordion.addChild(q1); >> } >> } >> >> what happens is the bottom of the accordion is now cut off and u have to >> scroll the panel to see it, because the created childrens' contents are >> taller than the viewable area. I want the accordion to take up 100% height >> like i told it and the inner contents of the accordion to scroll if they are >> too tall. i hope that all made sense, it's really frustrating and kinda >> hard to explain. >> >> thanks, >> d. >> >> > > -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation [EMAIL PROTECTED],

