Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>From the Flex 4 SDK doc (<a href="http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7e4d.html" rel="nofollow">link text</a>):</p> <p>"The default width and height of a ViewStack container is the width and height of the first child. A ViewStack container does not change size every time you change the active child.</p> <p>You can use the following techniques to control the size of a ViewStack container so that it displays all the components inside its children:</p> <pre><code>1. Set explicit width and height properties for all children to the same fixed values. 2. Set percentage-based width and height properties for all children to the same fixed values. 3. Set width and height properties for the ViewStack container to a fixed or percentage-based value. </code></pre> <p>The technique that you use is based on your application and the content of your ViewStack container."</p> <p>To get around this you can add a scroller inside navigator contents. Code may look something like this:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"&gt; &lt;fx:Declarations&gt; &lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt; &lt;/fx:Declarations&gt; &lt;s:TabBar dataProvider="{myselfViewStack}"/&gt; &lt;mx:ViewStack id="myselfViewStack" left="0" right="0" top="100" bottom="0"&gt; &lt;s:NavigatorContent&gt; &lt;s:Scroller width="100%" height="100%"&gt; &lt;s:Group&gt; &lt;!-- scrollbar not shown --&gt; &lt;s:Group width="100%" height="100"&gt; &lt;s:Label text="1"/&gt; &lt;/s:Group&gt; &lt;/s:Group&gt; &lt;/s:Scroller&gt; &lt;/s:NavigatorContent&gt; &lt;s:NavigatorContent&gt; &lt;s:Scroller width="100%" height="100%"&gt; &lt;s:Group&gt; &lt;!-- scrollbar shown --&gt; &lt;!-- Explicit height set in group to "simulate" content --&gt; &lt;s:Group width="100%" height="1500"&gt; &lt;s:Label text="2"/&gt; &lt;/s:Group&gt; &lt;/s:Group&gt; &lt;/s:Scroller&gt; &lt;/s:NavigatorContent&gt; &lt;s:NavigatorContent&gt; &lt;s:Label text="3"/&gt; &lt;/s:NavigatorContent&gt; &lt;/mx:ViewStack&gt; &lt;/s:Application&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload