1 Reply Latest reply on Jun 30, 2009 5:18 PM by chris.huston.t10

    show one panel, hide another with one checkbox or what is the opposite of 'selected'?

    Kkofal Level 1

      Noob to FLEX 2.0...


      I want to show one panel when checkBox is selected and another when it is not.  Showing the one is easy visible="{cb1.selected}", and when it isn't selected it goes away.  Piece of cake!  However I do not know what the opposite of {cb1.selected} is.  Searches have proven to be futile, but I did bookmark some other threads that I will use like hiding and showing data columns in a dataGrid.


      I tried using:  hide="{cb1.selected}"




      here is the relevant code:


      <mx:WipeLeft id="wipeOut" duration="1000"/>
      <mx:WipeRight id="wipeIn" duration="1000"/>


      <mx:CheckBox id="cb1" label="Show display options" selected="false" x="340" y="95"/>


      <mx:Panel height="300" width="500" x="200" y="150" visible="{cb1.selected}" hideEffect="{wipeOut}" showEffect="{wipeIn}">

                ....stuff to show when selected...


      <mx:Panel height="300" width="500" x="200" y="150" visible="{cb1.???}" hideEffect="{wipeOut}" showEffect="{wipeIn}">


                ...other stuff to show when NOT selected....





      Please help or point me in the correct direction.