在ViewStack內部創建ViewStack時,使用中繼器和其他組件(即vBox)創建ViewStack時出現問題。中繼器放置在視圖的底部。儘管中繼器在其他組件之前被列出,但它被放置在底部。使用中繼器的Flex ViewStack - 中繼器置於底部
是否有解決方法,我可以在其他組件之前繪製中繼器?
我把這個和其他人問了同一個問題,但沒有人回答。我正在粘貼來自他們帖子的示例代碼。中繼器最後繪製。
感謝
下面是一個例子:
<mx:ViewStack id="viewStack" width="100%" height="100%" backgroundColor="#FFFFFF"
backgroundAlpha="1" paddingLeft="5" paddingRight="5" paddingBottom="5">
<mx:Repeater id="editorsRP" dataProvider="{dynamicFields}"
repeatEnd="organizeViewStack();" width="100%" height="100%">
<editor:DynamicFieldEditor label="{FieldGroup(editorsRP.currentItem).name}"
width="100%" height="100%" fields="{FieldGroup(editorsRP.currentItem).fields}" dataProvider="{details}" />
</mx:Repeater>
<editor:NotesEditor id="notesEditor" width="100%" height="100%" label="Notes"
enabled="false" notesProvider="{attachment}" />
</mx:ViewStack>
ViewStack的許多不同的孩子。爲了更清楚,我有一個tabBar和裏面,我有一個ViewStack。我創建了幾個總是存在的標籤。我正在使用中繼器基於陣列中的數據創建制表符。所以第一個標籤總是在那裏,然後我有一箇中繼器,它可以創建x個標籤,在中繼器之後,我有另一個標籤,它總是在那裏。我試圖用vbox包裝中繼器,但它只是創建一個標籤,而不是基於數組中數據的x編號。 – Dana 2010-09-03 14:50:31
我認爲@Dana希望看到一堆DynamicFieldEditor容器,後面跟着一個NotesEditor - 這對我來說聽起來很公平。 – Amarghosh 2010-09-03 14:52:45
這裏是一個很好的例子: 的 \t \t \t \t \t的 \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t的 \t \t \t \t \t \t \t \t \t \t \t MX:中繼> \t \t \t \t \t的 \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t mx:ViewStack> –
Dana
2010-09-03 14:53:50