如何在单击按钮时打开新选项卡

发布于 2024-12-27 09:38:32 字数 105 浏览 2 评论 0原文

我有一个选项卡导航器,其中包含 4 个选项卡“帐户”、“配置”、“系统”和“仪表板”。在“配置”选项卡中有一个标记为“添加新配置”的按钮。如果用户单击此按钮,系统选项卡应打开 - 如何执行此操作?

I have a tab navigator which contains the 4 tabs Account, Configuration, System and Dashboard. In the Configuration tab there is a button labeled add new config. If the user clicks this button the system tab should open - how to do this?

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

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

发布评论

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

评论(1

盗梦空间 2025-01-03 09:38:32
<mx1:TabNavigator width="50%" height="50%" id="tabnav">

    <mx1:VBox label="Account" width="20%" height="20%">

    </mx1:VBox>
    <mx1:VBox label="Configuration" width="20%" height="20%">
        <s:Button id="c" click="c_clickHandler(event)" label="new config"/>
    </mx1:VBox>
    <mx1:VBox label="System" width="20%" height="20%">

    </mx1:VBox>
    <mx1:VBox label="Dash board" width="20%" height="20%">

    </mx1:VBox>

</mx1:TabNavigator>


protected function c_clickHandler(event:MouseEvent):void
   {
     tabnav.selectedIndex = 2;
   }
<mx1:TabNavigator width="50%" height="50%" id="tabnav">

    <mx1:VBox label="Account" width="20%" height="20%">

    </mx1:VBox>
    <mx1:VBox label="Configuration" width="20%" height="20%">
        <s:Button id="c" click="c_clickHandler(event)" label="new config"/>
    </mx1:VBox>
    <mx1:VBox label="System" width="20%" height="20%">

    </mx1:VBox>
    <mx1:VBox label="Dash board" width="20%" height="20%">

    </mx1:VBox>

</mx1:TabNavigator>


protected function c_clickHandler(event:MouseEvent):void
   {
     tabnav.selectedIndex = 2;
   }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文