RE: [flexcoders] Manipulating tree label programmatically
You can subclass TreeItemRenderer and do those things in updateDisplayList From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nhid Sent: Wednesday, September 26, 2007 7:48 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Manipulating tree label programmatically Hi, I am trying to change the label of a tree item for when the item is selected. branch1 child1A branch2 child2A child2Aa child2Ab First problem is I need to add a character, lets say #, to the label, so when I click on child1A, it should now display #child1A. Second problem is changing the style of the label, bolding it, to the label, so when I click on branch2, it should now display branch2. Any idea is greatly appreciated.
Re: [flexcoders] Manipulating tree label programmatically
I'm sorry, I misinterpreted the requirements. The labels should display with # or bold if they meet a particular condition when the tree is being populated, not when the item is clicked. Alex, I'm not using TreeItemRenderer, just the tree control. On 9/26/07, Alex Harui [EMAIL PROTECTED] wrote: You can subclass TreeItemRenderer and do those things in updateDisplayList -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *nhid *Sent:* Wednesday, September 26, 2007 7:48 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Manipulating tree label programmatically Hi, I am trying to change the label of a tree item for when the item is selected. branch1 child1A branch2 child2A child2Aa child2Ab First problem is I need to add a character, lets say #, to the label, so when I click on child1A, it should now display #child1A. Second problem is changing the style of the label, bolding it, to the label, so when I click on branch2, it should now display *branch2*. Any idea is greatly appreciated.
RE: [flexcoders] Manipulating tree label programmatically
Either way, you will need to use a custom TreeItemRenderer. Here is one example: http://www.cflex.net/showFileDetails.cfm?ObjectID=575 Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nhid Sent: Wednesday, September 26, 2007 1:40 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Manipulating tree label programmatically I'm sorry, I misinterpreted the requirements. The labels should display with # or bold if they meet a particular condition when the tree is being populated, not when the item is clicked. Alex, I'm not using TreeItemRenderer, just the tree control. On 9/26/07, Alex Harui [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: You can subclass TreeItemRenderer and do those things in updateDisplayList From: flexcoders@yahoogroups.com http://ups.com/ [mailto: flexcoders@ mailto:flexcoders@ yahoogroups.com http://yahoogroups.com ] On Behalf Of nhid Sent: Wednesday, September 26, 2007 7:48 AM To: [EMAIL PROTECTED] ups.com http://ups.com/ Subject: [flexcoders] Manipulating tree label programmatically Hi, I am trying to change the label of a tree item for when the item is selected. branch1 child1A branch2 child2A child2Aa child2Ab First problem is I need to add a character, lets say #, to the label, so when I click on child1A, it should now display #child1A. Second problem is changing the style of the label, bolding it, to the label, so when I click on branch2, it should now display branch2. Any idea is greatly appreciated.