Flex -, Größe Kinder, wenn ein Elternteil ist die Größe

Habe ich Schaltflächen mit denen ich gedreht vertikal innerhalb einer Leinwand, das ist in Ordnung. Das problem tritt auf, wenn der Benutzer die Fenstergröße ändert, um eine kleine Größe eine vertikale Bildlaufleiste angezeigt, ich hätte lieber jede Taste gequetscht, der bis zu einer kleineren Größe.

<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="40" maxWidth="40" xmlns:myComponents="myComponents.*"
  horizontalScrollPolicy="off"
 creationComplete="created()" initialize="init()">
 <mx:Script>
    <![CDATA[
        import mx.effects.Rotate;

        function created() : void {
            addBtn("Personal");
            addBtn("Work");
            addBtn("Three");
            addBtn("Four");

        }

        function addBtn(name:String) {
            var newBtn: Button = new Button();
            newBtn.label = name;
            newBtn.styleName = "drawerButton";
            newBtn.width = 150;
            newBtn.x = (-newBtn.width /2) + 50;
            newBtn.y = (-newBtn.height /2) - 30;

            var rotationContainer:Canvas = new Canvas();
            rotationContainer.clipContent = false;
            rotationContainer.addChild(newBtn);
            rotationContainer.rotation = 90;
            rotationContainer.height = 150;

            uiContainer.addChild(rotationContainer);
        }

    ]]>
 </mx:Script>
 <mx:VBox x="5" y="30" right=""  >
    <mx:VBox id="uiContainer" right="0" verticalGap="2" >
    </mx:VBox>
    <mx:Button id="uiAdd" styleName="addButton" >
    </mx:Button>
    <mx:Button id="uiRename" styleName="renameButton">
    </mx:Button>
    <mx:Button id="uiDelete" styleName="deleteButton">
    </mx:Button>
 </mx:VBox>

So, in diesem Fall die Tasten gehen würde, ab einer Breite von 150 bis min 20.

InformationsquelleAutor rid00z | 2009-07-29

Schreibe einen Kommentar