You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by "alexandre.barreiros" <al...@arealmedia.com> on 2013/11/13 18:02:46 UTC

Problem with Accordion

Hi All,

I'm trying to use the accordion component, i know that the accordion is
still on experimental, but i'm currently migrating an app from Flex 3 to
Flex 4  and i need this component. My problem is, when i enter the accordion
i see all the children for the other index that is not the first child,
please see the code in attach 

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
minHeight="600" 
			   xmlns:ns="http://flex.apache.org/experimental/ns" xmlns:local="*">
		

	<ns:Accordion width="100%" height="100%" creationPolicy="all" top="50"
left="50" right="50">
		<s:NavigatorContent width="100%" height="100%" label="A Parent"
minWidth="0" minHeight="0">
			<s:Group width="100%" height="100%">
				<s:Rect width="100%" height="100%">
					<s:fill>
						<s:SolidColor color="#ff0000"/>
					</s:fill>
				</s:Rect>
				<s:VGroup width="100%" height="100%">
					<s:Button label="A BTN1"/>
					<s:Button label="A BTN2"/>
				</s:VGroup>
			</s:Group>
		</s:NavigatorContent>
		<s:NavigatorContent width="100%" height="100%" label="B Parent"
minWidth="0" minHeight="0">
			<s:Group width="100%" height="100%">
				<s:Rect width="100%" height="100%">
					<s:fill>
						<s:SolidColor color="#00FF00"/>
					</s:fill>
				</s:Rect>
				<s:VGroup width="100%" height="100%" left="50">
					<s:Button label="B BTN1"/>
					<s:Button label="B BTN2"/>
				</s:VGroup>
			</s:Group>
		</s:NavigatorContent>
		<s:NavigatorContent width="100%" height="100%" label="C Parent"
minWidth="0" minHeight="0">
			<s:Group width="100%" height="100%">
				<s:Rect width="100%" height="100%">
					<s:fill>
						<s:SolidColor color="#0000FF"/>
					</s:fill>
				</s:Rect>
				<s:VGroup width="100%" height="100%" left="100">
					<s:Button label="C BTN1"/>
					<s:Button label="C BTN2"/>
				</s:VGroup>
			</s:Group>
		</s:NavigatorContent>
	</ns:Accordion>
</s:Application>
	

Thanks in advance if someone can help me out.
Best Regards
Alexandre



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Problem-with-Accordion-tp3723.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Issue with ns:Accordion

Posted by Nemi <ne...@gmail.com>.
I have similar problem. Did you solve this?
I think you can't use NavigatorContent with this (Spark) Accordion. In  docs
<https://flex.apache.org/asdoc/spark/components/NavigatorContent.html>   it
says:
/Do not use a NavigatorContent container outside of an MX navigator
container./

What I need is to add Accordion elements dynamically, and when I use
accordion.addElement() I only see one visible child (ButtonBar is ok). And
if I use accordion.contentGroup.addElement() I see all elements, but problem
is they are all visible when added.
How to force accordion to re-do layout of elements, and show only selected
one?




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Issue-with-ns-Accordion-tp3723p12573.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.