我需要从一个对话框平滑过渡到另一个看起来相同的对话框

发布于 2024-10-19 10:05:08 字数 167 浏览 3 评论 0原文

我正在创建一个应用程序,该应用程序的顶部有一排按钮,根据选择的按钮,另一行按钮会出现在侧面。我计划执行此操作的方法是为顶行的每个按钮创建一个单独的对话框,并在选择按钮时弹出一个新对话框。到目前为止,我能够弹出新对话框并隐藏主对话框,但很明显发生了一些事情。有谁知道如何使其无缝显示?

感谢您的帮助! 玛丽

I am creating an app that has a row of buttons across the top and depending on the button that gets selected another row of buttons appears across the side. The way I planned on doing this is to create a separate dialog box for each of the top row of buttons and have a new dialog pop up when a button is selected. So far I am able to pop up the new dialog and hide the main one but it's obvious that something has happened. Does anyone know how to make this appear seamlessly?

Thanks for your help!
Mary

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

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

发布评论

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

评论(3

懒猫 2024-10-26 10:05:08

如果界面发生变化,用户应该看到变化。它可以帮助他们有效地使用该程序。您正在尝试实现更美观的转变吗?

If the interface changes the user SHOULD see the change. It helps them use the program effectively. Is what you're trying to achieve a more aesthetic transition?

最终幸福 2024-10-26 10:05:08

对于您想要实现的目标,最常用的解决方案是在主对话框中嵌套一个对话框。让我解释一下:

  • 将顶部按钮放在主对话框上
  • 创建一个新对话框并将其样式设置为 Child,以便将其移动并嵌套在另一个对话框中
  • 当您创建第二个对话框时(在代码中调用函数 Create 时)确保将第一个对话框指定为它的父对话框。确保您不使用 DoModal 来显示此对话框。使用“创建”,然后使用“显示窗口”。
  • 确保第二个对话框比第一个对话框小,并将其放置在按钮行下方。

通过这种方式,您可以为每次按下按钮创建一个单独的对话框,每个对话框具有不同的控件,从而模拟选项卡式界面。
请参阅此处的部分示例: http://www.codeproject.com/kb/dialog/modelesschild .aspx

希望这有帮助。

The most commonly used solution for what you are trying to achieve is to have a dialog nested inside the main dialog. Let me explain:

  • Put the top buttons on the main dialog
  • Create a new dialog and set it's Style to Child so that it will be moved and nested inside another dialog
  • When you create the second dialog (when calling the function Create in the code) make sure you specify the first dialog as it's parent. Make sure you don't use DoModal to show this dialog. Use Create and then ShowWindow.
  • Make sure the second dialog is smaller than the first and position it so that it appears under the button row.

In this way you can create a separate dialog for each button press, each dialog having different controls thus simulating a tabbed interface.
See a partial example here: http://www.codeproject.com/kb/dialog/modelesschild.aspx

Hope this helps.

青萝楚歌 2024-10-26 10:05:08

这听起来像是一个属性表界面。它们在顶部使用一排选项卡,而不是按钮。使用该可视化界面对您来说更容易:CPropertySheet< /a> 和您的用户,他们已经熟悉该界面。

This sounds like a property sheet interface. Those use a row of tabs on top, not buttons. Using that visual interface is both easier for you: CPropertySheet and your users, who are already familiar with that interface.

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