You have to walk up the parent chain and check each parent.

On 10/17/13 8:36 AM, "moushuai00" <[email protected]> wrote:

>Hi All:
>
>How to determine the component is not visible, When I set the container
>invisible, but the property of the child is visible.
>
><fx:Script>
><![CDATA[
>import mx.controls.Alert;
>
>protected function button1_clickHandler(event:MouseEvent):void
>{
>trace(container.visible);
>trace(children.visible);
>container.visible = false;
>}
>protected function button2_clickHandler(event:MouseEvent):void
>{
>trace(container.visible);
>trace(children.visible);
>}
>]]>
></fx:Script>
><fx:Declarations>
><!-- 将非可视元素(例如服务、值对象)放在此处 -->
></fx:Declarations>
><s:VGroup id="container">
><s:TextInput id="children"/>
></s:VGroup>
><s:Button x="10" y="50" label="hide" click="button1_clickHandler(event)"/>
><s:Button x="112" y="50" label="getProperty"
>click="button2_clickHandler(event)"/>
> 
>
>
>
>
>moushuai00

Reply via email to