Hi All,

This is stripped down version of my Application. where I am trying to
change font style of particular tree node. can any one help me how to
do this ? Actually I want to make fontStyle Bold of first node in tree.

here is code. it's not the complete one. just to post it here, I
striped it. it may have some bugs. but this is just to show how I am 
filling the tree.

<mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml";
        layout="vertical" title="Test"
        creationPolicy="all" creationComplete="onCreationComplete()">

<mx:Script>
<![CDATA[

private var dateFormatter:DateFormatter;

[Bindable] private var testData: XML = 
new XML('<apts id="Appointments"></apts>');


private function onCreationComplete(): void
{
 dateFormatter = new DateFormatter();
 dateFormatter.formatString = "EEEE MMMM D, YYYY";

 testData = new XML('<apts id="Appointments"></apts>');
 var dt: Date = Date()
 dt = new Date(dt.getFullYear(), dt.getMonth(), dt.getDate());
 var dtXML: XML = new XML();
 for (var i:uint = 0; i < 10; i++)
 {
   dtXML = <date id={dateFormatter.format(dt)} data={i}/>
   testData.appendChild(dtXML);
   dt = new Date(dt.getFullYear(), dt.getMonth(), dt.getDate() + 1);
 }
}

]]>
</mx:Script>

        <mx:Tree 
                id="testTree"
                width="100%" height="100%"
                labelField="@id"
                dataProvider="{testData}"/>

</mx:Application>

thanks
-- Prabs

Reply via email to