如何在 AIR 应用程序中隐藏视图堆栈?

发布于 2024-07-27 17:27:02 字数 1561 浏览 2 评论 0原文

我有两个视图堆栈,一个用于主菜单,另一个用于子菜单。 我想一次仅显示一个 viewstacks 的 viewstack 页面信息。 又一躲。 如果我单击子菜单视图堆栈,则主菜单视图堆栈将被隐藏。 我怎样才能做到这一点 ? 我不知道它是否正确。 如果您有任何其他选项来使用视图堆栈添加子菜单和 manimenu,请建议我。

我尝试过(visible=false)子菜单viewstack是

     <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>

主菜单viewstack是

<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>

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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

美煞众生 2024-08-03 17:27:02

您拼写错误了属性“visible”。 应该是“可见”而不是“可见”。

此外,您可能想使用 includeInLayout="false"

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

主菜单也一样。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文