Given you have a container(outer) that contains another container
(inner) which itself contains a control that is large enough to force
the scrollbars on in container inner i.e.
<mx:VBox id="outer">
<mx:VBox height="300" id="inner">
<mx:DataGrid height="400" width="200"/>
</mx:VBox>
</mx:VBox>
Then you run the following code (you can run it from appComplete)
inner.parent.removeChild(inner);
var lbl:Label = new Label();
lbl.text="HELLO WORLD"
inner.addChild(lbl);
outer.addChild(inner);
The Label never appears, however change the height of inner (say just
remove the height attribute) so the scrollbars dont come on, run
again and Label appears.
Anyone seen this issue?
It appears to me the problem is connected with setting the nestLevel
on child controls.
When you add the inner container back in it will try to set the
nestLevel on all its children which is what we want for the Label
becuase as it is newly created its nestLevel is 0 and it wont appear.
However it uses "rawChildren" to iterate over the child objects and
if the scrollbars are on the Label is not a raw child of the
container, the contentPane is but it is a sprite so it is ignored by
the container so Label never gets its nestLevel set.
The reason why the grid stays visible is because its nestLevel never
got set to 0 when the container was removed because again the
container ignored it.
Seems a prb in both FB2 and FB3.
tks