Does anyone know how to get an accordion to occupy a specified relative
height (e.g. 25% of the application) while ensuring that all accordion
headers are visible?

There are two methods that come pretty close. Both solutions behave
exactly as desired when the content of the accordion's first child is
small, however, they become problematic when there is a larger amount of
content there. (The accordion containers are default behavior is to use
a height equal to their first child:
http://livedocs.adobe.com/flex/3/langref/mx/containers/Accordion.html).

The first method:

<mx:Panel width="100%" height="25%">
     <mx:Accordion id="optionsAccordion" width="100%">
         <vso:Form label="Accordion Entry 1" width="100%" />
         .
         .
         .

In this case, things work fine when the content of the first accordion
section is small, but when it is larger than the desired height, it
"pushes" the panel size up so that it may become very large (e.g. 60%
instead of 25% of the screen).


For the other method:

<mx:Panel width="100%" height="{this.height / 4}">
     <mx:Accordion id="optionsAccordion" width="100%">
         <vso:Form label="Accordion Entry 1" width="100%" />
         .
         .
         .

...the height of the panel containing the accordion always uses the
correct size, however, the accordion itself may be much larger causing a
scrollbar to appear within the panel, and some of the accordion section
headers to be pushed down.

Originally, I thought the issue was related to how the Panels behaved
(see http://tech.groups.yahoo.com/group/flexcoders/message/137291), but
after some further testing, it appears to be specifically related to how
the accordions behave.

Any Ideas? Any help would be greatly appreciated!

Thanks,
Keith

Reply via email to