R – Flex Tree Control how to get the itemEditorInstance of a just added xml node

apache-flexcontrolsitemeditortree

I have a Tree Control on which I let user add some nodes. When a node gets added I want to let the user edit the added control right away. How do I get the itemEditorInstance of a just added xml node?

Thanks for hints!
Markus

Best Solution

You just have to override the createItemEditor method, such as:

override public function createItemEditor(colIndex:int, rowIndex:int):void
{
  super.createItemEditor(colIndex, rowIndex);
  itemEditorInstance.cacheAsBitmap = true;
  itemEditorInstance.opaqueBackground = 0xFFFFFF;
  itemEditorInstance.alpha = 1;
}
Related Question