Accordion

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Accordion

chris_flex
Hi,

I want to use the accordion. My code for testing is:

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:sp="spark.containers.*">
    <sp:Accordion creationPolicy="all">

        <s:VGroup>
            <s:Rect width="100" height="10">
                <s:fill>
                    <s:SolidColor color="0xFF0000"/>
                </s:fill>
            </s:Rect>
            <s:Rect width="100" height="100">
                <s:fill>
                    <s:SolidColor color="0x00FF00"/>
                </s:fill>
            </s:Rect>
        </s:VGroup>
        <s:VGroup>
            <s:Rect width="100" height="10">
                <s:fill>
                    <s:SolidColor color="0x0000FF"/>
                </s:fill>
            </s:Rect>
            <s:Rect width="100" height="100">
                <s:fill>
                    <s:SolidColor color="0xFF0000"/>
                </s:fill>
            </s:Rect>
        </s:VGroup>
    </sp:Accordion>
</s:View>

The result looks not like I hace expected:

<http://apache-flex-users.2333346.n4.nabble.com/file/t605/screenshot.png>

Are there any examples how to use the component?



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Accordion

Alex Harui-2
You might need to set the VGroup width and height to 100%.  Some for the
Accordion.  And set either the "label" or "name" property on the VGroup.

On 1/5/18, 5:02 AM, "chris_flex" <[hidden email]> wrote:

>Hi,
>
>I want to use the accordion. My code for testing is:
>
><s:View
>xmlns:fx="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2F
>ns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ce22720a4843
>e4dc2529408d5543ca527%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6365075
>41806966184&sdata=GqFNZXBlkCgga7lwhmMXhAZY8WKphw2ZtJ4xYXSMwtc%3D&reserved=
>0"
>xmlns:s="library://ns.adobe.com/flex/spark"
>        xmlns:sp="spark.containers.*">
>    <sp:Accordion creationPolicy="all">
>
>        <s:VGroup>
>            <s:Rect width="100" height="10">
>                <s:fill>
>                    <s:SolidColor color="0xFF0000"/>
>                </s:fill>
>            </s:Rect>
>            <s:Rect width="100" height="100">
>                <s:fill>
>                    <s:SolidColor color="0x00FF00"/>
>                </s:fill>
>            </s:Rect>
>        </s:VGroup>
>        <s:VGroup>
>            <s:Rect width="100" height="10">
>                <s:fill>
>                    <s:SolidColor color="0x0000FF"/>
>                </s:fill>
>            </s:Rect>
>            <s:Rect width="100" height="100">
>                <s:fill>
>                    <s:SolidColor color="0xFF0000"/>
>                </s:fill>
>            </s:Rect>
>        </s:VGroup>
>    </sp:Accordion>
></s:View>
>
>The result looks not like I hace expected:
>
><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>ex-users.2333346.n4.nabble.com%2Ffile%2Ft605%2Fscreenshot.png&data=02%7C01
>%7Caharui%40adobe.com%7Ce22720a4843e4dc2529408d5543ca527%7Cfa7b1b5a7b34438
>794aed2c178decee1%7C0%7C0%7C636507541806966184&sdata=U6qSZM7Y%2BBNixIjP486
>8AQ421IGHEmoMFLMUzLZedVI%3D&reserved=0>
>
>Are there any examples how to use the component?
>
>
>
>--
>Sent from:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-users.2333346.n4.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7Ce2272
>0a4843e4dc2529408d5543ca527%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>36507541806966184&sdata=cqKJKBBOD%2FQXL3iPP%2Fh1PKOTPyRbo9p2Wrp%2FUHYoVvI%
>3D&reserved=0