我在 Hgroup 中有三个组件,所有三个组件都可以扩展。但问题是,这三个组件都向正确的方向扩展。并且容器没有足够的空间来做到这一点,所以我需要的是
第一个向右扩展
第二个向左右扩展
第三个向左扩展。
其他人将在此过程中被推开。
像这样。
但是如何定义组件的扩展方向呢?
组件的代码是这样的
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width.State2="500" height.State2="550"
width.State1="330" height.State1="550">
<s:states>
<s:State name="State1"/>
<s:State name="State2"/>
</s:states>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<mx:LinkButton includeIn="State1" x="222" y="519" label="Expand" click="currentState='State2'"/>
<mx:LinkButton includeIn="State2" x="433" y="519" label="Return"
click="currentState='State1'"/>
</s:Group>
并且在主comp中,其中三个Comp将嵌套在HGroup中
<s:HGroup x="90" y="62" width="1000" height="550">
<ns1:comp1>
</ns1:comp1>
<ns1:comp2>
</ns1:comp2>
<ns1:comp3>
</ns1:comp3>
</s:HGroup>