标签下的新视图 [英] New view under a Tab

查看:65
本文介绍了标签下的新视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个带有选项卡控件的对话框视图.同一视图(图形)将显示在所有选项卡下,并且仅会根据选项卡更改值.现在,我希望添加具有新视图的新选项卡.但是,由于我的原始对话框是自己创建的选项卡控件和其他图形,因此,如果我显示添加的新选项卡的新对话框,则该选项卡控件将被隐藏,因为它是旧对话框视图的一部分.

Hi,

I have a Dialog view which has tab controls. Same view(graphical) will be displayed under all the tabs and only the values will be changed based on the tabs. Now i wish to add new tab with new view. But as my original dialog has created the tab controls and other graphics in its own, if i show my new dialog for the new tab added, tab controls are being hided because it is a part of my old dialog view. How to achieve my requirement wihtout much design change?

推荐答案

即使您已将其标记为C ++/CLI,我也不能百分百确定这是否正确.这是C ++/MFC吗?

无论哪种方式,与平台无关的答案都是您不应创建新的选项卡控件.相反,您需要向现有的选项卡控件中添加一个新的选项卡,并且需要将一个或多个基本视图控件添加到此新添加的选项卡页面中.如果将子控件设计为显示在选项卡页面中作为单独的用户控件,则会更容易.

这适用于C#,C ++/CLI或MFC.
Even though you have tagged this as C++/CLI, I am not 100% sure if that is accurate. Is this C++/MFC by any chance?

Either way, the platform agnostic answer is that you should not create a new tab control. Instead you need to add a new tab to the existing tab control, and you need to add your basic view control (or controls) into this newly added tab page. It is easier if you design the child control that''s supposed to show up in a tab page as a separate user control.

This holds for C#, C++/CLI or MFC.


为什么不将新的标签页添加到现有表单中呢?鉴于您到目前为止提供的描述,我认为不需要进行设计更改.
Why don''t you just add the new tab page to the existing form? I see no need for a design change given the description you''ve provided so far.


这篇关于标签下的新视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆