Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Strange as it seems, now that you mention it, I don't believe there is a simple test to determine whether a component is actually visible onscreen in the sense Component.isShowing() implies.</p> <p>It's also true the show and hide events don't bubble by default, so if you want to be notified of visibility changes in a descendant of a ViewStack container, you'll need to listen for them explicitly. The implementation details would vary depending on what sort of behavior you were after, but to take the simple example:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"&gt; &lt;mx:VBox&gt; &lt;mx:HBox&gt; &lt;mx:Button id="btn1" click="vs.selectedIndex = 0" label="Show 1" /&gt; &lt;mx:Button id="btn2" click="vs.selectedIndex = 1" label="Show 2" /&gt; &lt;/mx:HBox&gt; &lt;mx:ViewStack id="vs" selectedIndex="0"&gt; &lt;mx:Panel id="panel1"&gt; &lt;mx:Label id="label1" text="Label 1" show="trace('showing label 1')" hide="trace('hiding label 1')" visible="{panel1.visible}" /&gt; &lt;/mx:Panel&gt; &lt;mx:Panel id="panel2"&gt; &lt;mx:Label id="label2" text="Label 2" show="trace('showing label 2')" hide="trace('hiding label 2')" visible="{panel2.visible}" /&gt; &lt;/mx:Panel&gt; &lt;/mx:ViewStack&gt; &lt;/mx:VBox&gt; &lt;/mx:Application&gt; </code></pre> <p>... you'll see the show and hide events for each label fire once their visible properties have been bound to their parent panels'. Hopefully that illustrates the point; you can extend it however best suits your application. Good luck!</p>
    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. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    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