1 Reply Latest reply on Jan 24, 2011 10:41 AM by Flex harUI

    Making the Component visble to false as soon as it leaves that Condition .

    kiran7881 Level 1

      Hi ,

      I have a ToggleButtonbar as shown below :


      <mx:ToggleButtonBar  width="25%" id="menu" dataProvider="{menuArray}" buttonMode="true" visible="false"/>

       

      Inside a function , depending Upon a Condition , i am making this visible to true and false as shown :

       

      if(viewName == PEOPLE)
      {
      menu.visible=true;
      }

       

      else if (viewName == DOMAIN)
      {
      menu.visible=false;
      }

       

      This above works fine .

       

      Now my questioon is  , rather than this approach is there any way that as soon as i leave the first condition taht is

       

      if(viewName == PEOPLE)

      {


      }


      Within this condition itself , i want to make this menu.visible=false; as soon as it leaves this condition .

       

      Please suggest as how to implement this (I cant use Views as UserIntrface is already developed and i am doing some bug fixing only )

       

      Thanks for reading .