Hi,
Thanks Deepa for ur solution.I have tried to use custom
ItemRenderer.Tweening is working fine.But how I do I change the row
backgroud color when user selects a row? is there any handler to
chage the selected color.
I have used the following code in my ItemRenderer:
Inside the updateDisplayList:
if(TreeListData(super.listData).hasChildren) {
graphics.clear();
graphics.beginFill(0xF4C403,1.0);
graphics.lineStyle(1, 0xF4C403, 1.0);
graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
graphics.endFill()
}
Thanks again for your reply.
regards,
Mick
--- In [email protected], "Deepa Subramaniam"
<[EMAIL PROTECTED]> wrote:
>
> This is because of the way the depthColors are drawn. They are only
> drawn in drawRowBackgrounds() which gets called in
updateDisplayList()
> so the row background colors are not tweened during the animation.
I've
> added an enhancement request to allow for tweening of background
row
> colors during the animation.
>
>
>
> Possible workarounds include overriding onTweenUpdate() and
manually
> tweening the backgroundColor of each row yourself. You might be
able to
> get away with writing your own TreeItemRenderer where each
UITextField
> was encompassed in an HBox with backgroundColor set. However I
think
> since renderers are re-used, you'd have to write some code to make
sure
> that as each renderer is re-used its backgroundColor is changed to
> maintain the color ordering prescribed by that row's depth.
>
>
>
> If you find the shifting of colors too ugly, you can change your
> openDuration to 0 so that there is no animation and the items just
open
> with the correct background row color.
>
>
>
> HTH,
>
> -deepa
>
>
>
> ________________________________
>
> From: [email protected]
[mailto:[EMAIL PROTECTED] On
> Behalf Of Mick Robin
> Sent: Tuesday, September 05, 2006 7:20 AM
> To: [email protected]
> Subject: [flexcoders] Tree Component expandItem Animation true
problem.
>
>
>
> Hi,
>
>
>
> I got a problem with the Tree Component. I have set the following
> properties for theTree componenet in my application:
>
>
>
> labelField="@label"
>
> width="100%"
> height="100%"
> defaultLeafIcon= "undefined"
> folderOpenIcon="undefined"
> folderClosedIcon="undefined"
> disclosureClosedIcon="undefined"
> disclosureOpenIcon="undefined"
> fontSize="10"
> depthColors= "[0xF4C406,0xffffff,0xF4C403]"
> borderStyle= "none"
> useRollOver="false"
> selectionDuration="0"
> selectionColor= "0xffff99
>
>
>
> Now when I am trying to call
>
> Tree.expandItem(event.currentTarget.selectedItem,true,true)
method.It
> opens the child items .Only thing the animation for the parent
node does
> not work.Only the labels get animated but the color behind the
label
> doesnot animate it suddely changes it position.I want the label and
> color to move at the same time.Any help??
>
>
>
> Thanks in advance
>
> Mick
>
>
>
>
>
>
>
> ________________________________
>
> Do you Yahoo!?
> Get on board. You're invited
>
<http://us.rd.yahoo.com/evt=40791/*http:/advision.webevents.yahoo.com
/ma
> ilbeta> to try the new Yahoo! Mail.
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/