我在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>
,並在主要排版,其中三個比較將是窩在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>
「所有三個組件都可以擴展」是什麼意思?他們如何擴展?他們什麼時候擴展?這是你寫的代碼還是你使用的通用HGroups? – JeffryHouser
展開意味着組件的長度可以擴展。我正在使用通用HGroups。我怎樣才能定義組件擴展的方向? – Samuel
這是什麼「組件」?它是現有組件還是自定義組件?如果定製,它是如何擴展的?顯示一些代碼。 – RIAstar