Adobe flex change default tree node icon by setting folderCl

Adobe flex change default tree node icon by setting folderCl

Postby haretu » Thu Mar 31, 2011 9:47 am

Adobe flex change default tree node icon by setting folderClosedIcon and folderOpenIcon
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:XML id="dp">
        <mlb>
            <league label="American League">
                <division label="East">
                    <team label="Boston" />
                    <team label="New York" />
                    <team label="Toronto" />
                    <team label="Baltimore" />
                    <team label="Tampa Bay" />
                </division>
                <division label="Central">
                    <team label="Cleveland" />
                    <team label="Detroit" />
                    <team label="Minnesota" />
                    <team label="Chicago" />
                    <team label="Kansas City" />
                </division>
                <division label="West">
                    <team label="Los Angeles" />
                    <team label="Seattle" />
                    <team label="Oakland" />
                    <team label="Texas" />
                </division>
            </league>
        </mlb>
    </mx:XML>

    <mx:Style>
        Tree {
            folderClosedIcon: ClassReference(null);
            folderOpenIcon: ClassReference(null);
        }
    </mx:Style>

    <mx:Tree id="TreeProject"
            dataProvider="{dp.league}"
            labelField="@label"
            iconField="@icon"
            showRoot="true"
            width="320"
            rowCount="9" />

</mx:Application>
Attachments
Screen shot 2011-03-31 at 9.47.43 AM.png
Screen shot 2011-03-31 at 9.47.43 AM.png (15.95 KiB) Viewed 2457 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