关于VDividedBox 的扩充
关于VDividedBox 的扩展!mx:Script![CDATA[private function onClick():void{grid2.visible falsegr
关于VDividedBox 的扩展!
<mx:Script>
<![CDATA[
private function onClick():void
{
grid2.visible = false;
grid2.includeInLayout =false;
}
]]>
</mx:Script>
<mx:Button id="button1" label="test" click="onClick()"/>
<mx:VDividedBox x="0" y="35" height="100%" width="100%">
<UI:DataGrid id="grid1" />
<UI:DataGrid id="grid2" />
</mx:VDividedBox>
上面这段代码中,单击button1,可以关闭Grid2窗格。
但是我想在上下两个窗格分界处显示一个三角。单击这个三角的时候,关闭Grid2窗格。
这个怎么做啊?
[解决办法]<mx:VDividedBox verticalGap="17" dividerDrag="vdividedbox1_dividerDragHandler(event)" dividerSkin="@Embed(source='com/google/code/flexiframe/assets/flex-iframe-logo-32.png')">
<mx:Canvas>
<mx:DataGrid />
</mx:Canvas>
<mx:Canvas id="canvas2">
<mx:DataGrid />
</mx:Canvas>
</mx:VDividedBox>
调用方法:
import mx.events.DividerEvent;
protected function vdividedbox1_dividerDragHandler(event:DividerEvent):void
{
canvas2.visible = false;
canvas2.includeInLayout = false;
}