在 pde 中隐藏选项卡

发布于 2024-08-07 16:58:44 字数 97 浏览 2 评论 0原文

我有一个编辑器(emf 编辑器)。我只想要编辑器中的一个选项卡。 如果我不添加其他页面,我仍然会在选项卡选择中看到一个选项卡。我可以隐藏该选项卡,这样用户就看不到它是多页编辑器吗?

I have an editor (emf editor). And I only want one of the tabs in the editor.
If I do not add the other pages, I still see one tab in the tab selection. Can I hide the tab, so the user will not see it is a multipageeditor?

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

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

发布评论

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

评论(2

浊酒尽余欢 2024-08-14 16:58:44

好的...找到了:

//the text must be empty so it will not be shown in the tab
setPageText(index, "");

//hide the tab
CTabFolder tabFolder = (CTabFolder)super.getContainer();
tabFolder.setSingle(true);

Ok... found it:

//the text must be empty so it will not be shown in the tab
setPageText(index, "");

//hide the tab
CTabFolder tabFolder = (CTabFolder)super.getContainer();
tabFolder.setSingle(true);
所有深爱都是秘密 2024-08-14 16:58:44

不,MultiPageEditorPart 用于多个页面,因此如果您想要一页,只需使用 EditorPart 即可。

我不确定你想做什么?你说你有“一个 EMF 编辑器”。这是您自己设计的编辑器还是您试图覆盖某些内容?

No, a MultiPageEditorPart is used for more than one page, so if you want one page just simply use and EditorPart.

I'm not sure what you are trying to do? You say you have 'an EMF editor'. Is this an editor of your own devising or are you trying to override something?

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