views:

417

answers:

1

I have two viewstacks one for Main menu and another one for submenu. I want to show viewstack page infomation at the time only one viewstacks . Another one hide . if i click submenu viewstack then Mainmenu viewstack will be hide . How can i do that ? I dont know whether it will be correct or not . If you have any other option for adding submenu and manimenu using view stack plz suggest me .

i tried like ( visible=false) Submenu viewstack is

     <mx:AddChild position="lastChild">
     <mx:ViewStack x="3" y="94" id="Submenu"  height="499" width="905" visiable="false" >
           <ns1:Pick15view  label="Pick15" x="10" y="10" height="511" width="904" showEffect="WipeDown" hideEffect="WipeUp">
       </ns1:Pick15view>
     <ns1:Lottoview label="Lotto" x="0" y="10" showEffect="WipeDown" hideEffect="WipeUp" height="493" width="902">
      </ns1:Lottoview>
         <ns1:Trottingbet  label="Trottingbet/Galobet" showEffect="WipeDown" hideEffect="WipeUp" x="362" y="183" height="489">
     </ns1:Trottingbet>
       </mx:ViewStack>
  </mx:AddChild>

Main menu viewsttack is

<mx:AddChild position="lastChild">
      <mx:ViewStack x="3" y="94" id="MainMenu"  height="499" width="905"  visible="true" >
       <ns1:home  label="Pick15" x="10" y="10" height="511" width="904" showEffect="WipeDown" hideEffect="WipeUp">
   </ns1:home>
 <ns1:Contact label="Lotto" x="0" y="10" showEffect="WipeDown" hideEffect="WipeUp" height="493" width="902">
  </ns1:Contact>
     <ns1:Rule  label="Trottingbet/Galobet" showEffect="WipeDown" hideEffect="WipeUp" x="362" y="183" height="489">
 </ns1:Rule>
   </mx:ViewStack>

+1  A: 

You have misspelled attribute "visible". Should be "visible" not "visiable".

Also you might want to use includeInLayout="false".

<mx:ViewStack x="3" y="94" id="Submenu"  height="499" width="905" visible="false" includeInLayout="false">

The same for Main menu.

zdmytriv
Thanks zdmytriv . y i should use includeInLayout="false".
R.Vijayakumar
visible="false" makes control invisible but it's still exists and takes space in parent control layout. includeInLayout="false" removes from parent layout, it's optional, If you want control to be just invisible then visible="false" enough.
zdmytriv
Thank you zdmytriv .
R.Vijayakumar