Flex ViewStack with repeater - the repeater gets a place at the bottom

I had a problem creating a ViewStack with a repeater along with other components (i.e. vBox) inside the ViewStack. Repeaters are placed at the bottom of the window. Although the repeater is indicated in front of other components, it is located at the bottom.

Is there a way in which I can get a relay done in front of other components?

I was looking for this, and someone else asked the same question on another site, but no one answered. I am inserting a sample code from my post. The repeater is drawn last.

thank

Here is an example:

<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>
+3
source share
2 answers

, , dataProvider set/changed.

, . , , , , , .

ViewStack , .

:

 <mx:TabNavigator width="500">
      <mx:VBox label="Static 1" />
      <mx:Repeater dataProvider="{['a','b','c']}">
          <mx:VBox label="From repeater" />
      </mx:Repeater>
      <mx:VBox label="Static 2" />
  </mx:TabNavigator>

dataProvider , :

¦ Static 1 ¦ From Repeater ¦ From Repeater ¦ From Repeater ¦ Static 2 ¦

, dataProvider ( dataProvider CollectionChangeEvent), 3 - , . :

¦ Static 1 ¦ Static 2 | From Repeater ¦ From Repeater ¦ From Repeater ¦

, organizeViewStack repeatEnd, .

- .

+2

,

ViewStack . . , ViewStack , .

, , (AKA ViewStack); Z-, , .

ViewStack? , "DynamicFieldEditors" -?

0

Source: https://habr.com/ru/post/1762956/


All Articles