Adobe flex sets icons on Accordion

Adobe flex sets icons on Accordion

Postby haretu » Thu Mar 24, 2011 11:24 am

Adobe flex sets icons on Accordion
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

    <mx:Script>
        <![CDATA[
            [Bindable]
            [Embed(source="assets/Accordion.png")]
            private var AccordionIcon:Class;

            [Bindable]
            [Embed(source="assets/ApplicationControlBar.png")]
            private var ApplicationControlBarIcon:Class;

            [Bindable]
            [Embed(source="assets/Box.png")]
            private var BoxIcon:Class;

            [Bindable]
            [Embed(source="assets/Canvas.png")]
            private var CanvasIcon:Class;

            [Bindable]
            [Embed(source="assets/ControlBar.png")]
            private var ControlBarIcon:Class;
        ]]>
    </mx:Script>

    <mx:Accordion id="accordion" backgroundAlpha="0.0"
            height="100%"
            width="100%"
            headerHeight="32"
            borderStyle="none"
            historyManagementEnabled="false">
        <mx:headerRenderer>
            <mx:Component>
                <mx:Button fontWeight="normal"
                        labelPlacement="left"
                        textAlign="left"
                        cornerRadius="{outerDocument.accordion.getStyle('headerHeight')/2}" />
            </mx:Component>
        </mx:headerRenderer>

        <mx:VBox label="Accordion"
                icon="{AccordionIcon}">
            <mx:Label text="The quick brown fox..." />
        </mx:VBox>

        <mx:VBox label="ApplicationControlBar"
                icon="{ApplicationControlBarIcon}">
            <mx:Label text="The quick brown fox..." />
        </mx:VBox>

        <mx:VBox label="Box"
                icon="{BoxIcon}">
            <mx:Label text="The quick brown fox..." />
        </mx:VBox>

        <mx:VBox label="Canvas"
                icon="{CanvasIcon}">
            <mx:Label text="The quick brown fox..." />
        </mx:VBox>

        <mx:VBox label="ControlBar"
                icon="{ControlBarIcon}">
            <mx:Label text="The quick brown fox..." />
        </mx:VBox>
    </mx:Accordion>

</mx:Application>
Attachments
Screen shot 2011-03-24 at 11.24.30 AM.png
Screen shot 2011-03-24 at 11.24.30 AM.png (21.9 KiB) Viewed 679 times
haretu
 
Posts: 132
Joined: Sat Jan 08, 2011 9:56 pm

Return to Adobe FLEX Flash

Who is online

Users browsing this forum: No registered users and 1 guest

cron