开发者

flex: how to Make two resize effect at the same time

开发者 https://www.devze.com 2023-01-03 18:39 出处:网络
Hy, Is it possible to resize the application at the same moment when the Accordion size change, to make effect resize og the last one synchronised with re开发者_如何学Gosize of Application ?

Hy,

Is it possible to resize the application at the same moment when the Accordion size change, to make effect resize og the last one synchronised with re开发者_如何学Gosize of Application ?

In my code,, the Application is resized after the resize of Accordion is completed:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                layout="absolute" minWidth="400" minHeight="300" backgroundColor="white" horizontalScrollPolicy="off" verticalScrollPolicy="off" mouseDown="stage.nativeWindow.startMove()">



    <mx:Resize id="expand" target="{application}" heightTo="{acc01.height}"/>
    <mx:Accordion id="acc01" x="0" y="0" resizeToContent="true" resize="expand.play();" horizontalScrollPolicy="off" verticalScrollPolicy="off">
        <mx:VBox label="Accordion Pane 1" width="100%" height="100%">            
            <mx:Label text="hello"/>
            <mx:Label text="hello"/>
            <mx:Label text="hello"/>
            <mx:Label text="hello"/>
        </mx:VBox>
        <mx:VBox label="Panel 2" width="100%" height="100%">
            <mx:Label text="hello"/>
            <mx:Label text="hello"/>
        </mx:VBox>
        <mx:VBox label="Panel 3" width="100%" height="100%">
               <mx:Label text="hello"/>
            <mx:Label text="hello"/>
        </mx:VBox>
        <mx:VBox label="Panel 4" width="100%" height="100%">
               <mx:Label text="hello"/>
            <mx:Label text="hello"/>
        </mx:VBox>
    </mx:Accordion>
</mx:Application>


Have a look at http://livedocs.adobe.com/flex/3/langref/mx/effects/Parallel.html, it might do what you need.

0

精彩评论

暂无评论...
验证码 换一张
取 消