geschema
geschema

Reputation: 2494

Vertical, Scrollable List of Panels

I'm using Adobe Flex Builder 4.5, and I'd like to create a vertical, scrollable list of panels for an AIR application. How do I do that?

Upvotes: 0

Views: 233

Answers (1)

RIAstar
RIAstar

Reputation: 11912

A little something like this:

<fx:Declarations>
    <s:ArrayCollection id="dp">
        <fx:Object title="Panel A" content="content AAAAA" />
        <fx:Object title="Panel B" />
        <fx:Object title="Panel C" />
        <fx:Object title="Panel D" />
    </s:ArrayCollection>
</fx:Declarations>

<s:List dataProvider="{dp}" height="100%">
    <s:itemRenderer>
        <fx:Component>
            <s:ItemRenderer>
                <s:Panel title="{data.title}">
                    <s:Label text="{data.content}" />
                </s:Panel>
            </s:ItemRenderer>
        </fx:Component>
    </s:itemRenderer>
</s:List>

Doesn't matter whether you're in AIR or just Flex.

Upvotes: 1

Related Questions