This content has been marked as final. Show 4 replies
I think you are refering to the following styles:
You can set them by embedding an image:
no, i'm sorry if i wasn't clear enough.
i am referring to the background color in each row in the tree. i want to replace the solid (or gradient) background with an image, that will cover the whole row and and lay behind the text and icons. Also, i need to switch that background image depending on the state of the row, if it's open or closed.
i hope that's more clear,
You will need to specify an itemRenderer for your tree. Probably the easiest thing to do is to create an Actionscript itemRenderer that extends the current TreeItemRenderer. In your renderer, you can override the updateDisplayList function to allow for a background image depending on your data.
Here is a skeleton of what your itemRenderer might look like:
public class MyTreeItemRenderer extends TreeItemRenderer
public function MyTreeItemRenderer()
override protected function updateDisplayList(unscaledWidth:Number,
//Add your code here to add an image to the background of this item