动态折叠 Spark BorderContainer 不会折叠其子项
protected function lbHideQuery_clickHandler(event:MouseEvent):void
{
if (lbHideQuery.selected)
{
lbHideQuery.label = "Show Query Panel";
origHeight = canvas1.height;
canvas1.height = 0;
}
else
{
lbHideQuery.label = "Hide Query Panel";
canvas1.height = origHeight;
}
}
]]>
</mx:Script>
<mx:LinkButton label="Hide Query Panel" id="lbHideQuery" toggle="true" click="lbHideQuery_clickHandler(event)"/>
<mx:Canvas id="canvas1" width="100%" height="20%" backgroundColor="0x353356">
<mx:VBox width="16%" height="90" minHeight="0" minWidth="0" id="vgbtns">
<mx:Button label="Button 1"/>
<mx:Button label="Button 2"/>
<mx:Button label="Button 3"/>
</mx:VBox>
但在 Flex 4 中,当 BorderContainer 折叠时,按钮仍然可见。
}
}
]]>
</fx:Script>
<mx:LinkButton label="Hide Query Panel" id="lbHideQuery" toggle="true" click="lbHideQuery_clickHandler(event)"/>
<s:BorderContainer width="100%" height="25%" backgroundColor="0x353356" id="bc1" >
<s:layout>
<s:HorizontalLayout paddingLeft="6"/>
</s:layout>
<s:VGroup width="16%" height="90" minHeight="0" minWidth="0" id="vgbtns">
<s:Button label="Button 1"/>
<s:Button label="Button 2"/>
<s:Button label="Button 3"/>
</s:VGroup>
</s:BorderContainer>
protected function lbHideQuery_clickHandler(event:MouseEvent):void
{
if (lbHideQuery.selected)
{
lbHideQuery.label = "Show Query Panel";
origHeight = canvas1.height;
canvas1.height = 0;
}
else
{
lbHideQuery.label = "Hide Query Panel";
canvas1.height = origHeight;
}
}
]]>
</mx:Script>
<mx:LinkButton label="Hide Query Panel" id="lbHideQuery" toggle="true" click="lbHideQuery_clickHandler(event)"/>
<mx:Canvas id="canvas1" width="100%" height="20%" backgroundColor="0x353356">
<mx:VBox width="16%" height="90" minHeight="0" minWidth="0" id="vgbtns">
<mx:Button label="Button 1"/>
<mx:Button label="Button 2"/>
<mx:Button label="Button 3"/>
</mx:VBox>
but in Flex 4 when the BorderContainer collapses the buttons are still visible.
}
}
]]>
</fx:Script>
<mx:LinkButton label="Hide Query Panel" id="lbHideQuery" toggle="true" click="lbHideQuery_clickHandler(event)"/>
<s:BorderContainer width="100%" height="25%" backgroundColor="0x353356" id="bc1" >
<s:layout>
<s:HorizontalLayout paddingLeft="6"/>
</s:layout>
<s:VGroup width="16%" height="90" minHeight="0" minWidth="0" id="vgbtns">
<s:Button label="Button 1"/>
<s:Button label="Button 2"/>
<s:Button label="Button 3"/>
</s:VGroup>
</s:BorderContainer>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)