Sorry to reply to my own post but I have found a workaround to the 
problem and thought I'd share it.

The display issues go away if you collapse and then expand the tree 
nodes so my workaround is simply to do this programmatically.

If I am adding a child node to a node which is expanded (open), I 
collapse it and set a flag to show that it must be expanded again later:

var needsExpanding:Boolean = false;
if ((groupTree.openItems as Array).indexOf(parentGroup) >= 0)
{
        groupTree.expandItem(parentGroup, false, false, false);
        needsExpanding = true;
}

I then add the new node to the parent.

Finally, I expand the parent node again if necessary:

if (needsExpanding)
{
        groupTree.expandItem(parentGroup, true, false, false);
}

This seems to do the trick.  By setting animate to false in the calls 
to expandItem() the collapse/expand is so fast you cannot see it 
happening.

Thanks all for your input on this.

Regards,

Nick.

Reply via email to