I'm having some trouble understanding the 'why' of the restriction on
the includeInLayout-property

As Stated in the livedocs, includeInLayout only applies to:
    * Box, or any of its subclasses: HBox, VBox, DividedBox,
HDividedBox, VdividedBox, Grid, GridItem, GridRow, ControlBar, and
ApplicationControlBar,
    * Form
    * Tile and its subclass, Legend
    * ToolBar
But then again, includeInLayout is a property of UIComponent.

Why aren't we allowed to hide a Canvas, ... ?

Or even better, when using a Box inside a TabNavigator (most likely
within any viewStack) this setting just gets ignored.

I do realise I could use addChild and RemoveChild for my tab inside
the navigator. However, consider the following:
A TabNavigator, a buttonbar with a button for each tab. A click on a
button changes includeInLayout and visible properties for the
corresponding tab.
What I expect is, that on clicking a button, the corresponding tab is
'removed' from the navigator. When making the tab visible again, it
shows up at the same position as before.

So why don't use removeChildAt() ?
Say I have 4 tabs, and I removed tab2. Next I want to remove the tab
originally at index3, but now at index2. Removing the third tab, ends
in removing the tab that was originally 4th...

And why don't use addChildAt() ?
State I somehow managed to remove the tabs 2-4 of a navigator of 5
tabs. Now I want to show(re-add) the original 4th tab. This tab should
be set 'in place' again. However when using addChildAt(3), you'll get
an indexOutOfBoundsException, since only tab 1 and 5 are present. What
leaves you a tabnavigator with numChildren of 2...

Any thought on solving this one?
--Johan

Reply via email to