我正在使用 Flex 3.6,我想将 GridItem 的 includeInLayout 属性设置为 false,但它不会产生任何效果。我有以下内容:
<mx:Grid width="100%" height="100%" id="appCore">
<mx:GridRow width="100%" height="100%">
<mx:GridItem width="100%" height="100%">
<np:NodePanel width="100%" height="100%" id="node1" idIndex="1" />
</mx:GridItem>
<mx:GridItem width="100%" height="100%" visible="{showAllPanels}" includeInLayout="{showAllPanels}">
<np:NodePanel width="100%" height="100%" id="node2" idIndex="2" />
</mx:GridItem>
</mx:GridRow>
<mx:GridRow width="100%" height="100%" visible="{showAllPanels}" includeInLayout="{showAllPanels}">
<mx:GridItem width="100%" height="100%">
<np:NodePanel width="100%" height="100%" id="node3" idIndex="3" />
</mx:GridItem>
<mx:GridItem width="100%" height="100%">
<np:NodePanel width="100%" height="100%" id="node4" idIndex="4" />
</mx:GridItem>
</mx:GridRow>
</mx:Grid>
当 showAllPanels=false 时,第二行正确地不显示,第一行展开整个页面。第一行右侧的 GridItem 未显示,但左侧的 GridItem 并未展开整个页面。如果我完全删除右侧的 GridItem,左侧的 GridItem 会完全扩展页面。
有什么技巧可以让它工作吗?