"or if its parent's parent is not the current view in a viewstack"

I think when the selected child changes in a ViewStack the ViewStack
sets the visible property of the old child to false, so checking
visibility of parents would still work in that case (same with TabNav
or Accordion).

Doug

On Sat, Apr 12, 2008 at 7:52 PM, Doug McCune <[EMAIL PROTECTED]> wrote:
> Ugly way #1:
>  Try adding a listener to SystemManager for the FlexEvent.SHOW and
>  FlexEvent.HIDE event using the capture phase. Then when that comes in
>  loop over all the children of the component that is being shown and do
>  whatever it is you need to do when you find a certain component is
>  being shown or hidden
>
>  Ugly way #2:
>  monkey patch UIComponent. Change the getter for visible. If the
>  UIComponent has normal visibility set to true, then check if it  has a
>  parent, if so return the parent's visibility (and since you're monkey
>  patching UIComponent that would trickle all the way up the display
>  list)
>
>  What is it exactly that you need to do if somewhere up in the display
>  list a parent has visible set to false?
>
>  Doug
>
>
>
>  On Sat, Apr 12, 2008 at 7:35 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  > There's no quick answer, you have to test each parent.
>  >
>  >
>  >
>  >  ________________________________
>  >
>  >
>  > From: [email protected] [mailto:[EMAIL PROTECTED] On
>  > Behalf Of Jason Rayles
>  >  Sent: Saturday, April 12, 2008 10:56 AM
>  >  To: [email protected]
>  >  Subject: [flexcoders] how do I know when a component is invisible
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  > I have some custom components, and they live inside various containers
>  >  inside various containers.
>  >
>  >  How can I let my components know that they are invisible, whether it is
>  >  the component itself that has visible=false or the parent's visibility
>  >  is false or if its parent's parent is not the current view in a
>  >  viewstack or any other permutation?
>  >
>  >  Thanks,
>  >  Jason
>  >
>  >  
>

Reply via email to