如何隐藏 TRibbon 页面?
我正在使用delphi 2009 的TRibbon 组件。 根据应用程序状态,某些页面不相关。 如何隐藏 TRibbon 页面?
RibbonPage1.Visible:=false 并没有真正隐藏页面...
这可能是微软规范不允许的吗?
谢谢你的帮助! 议员
i'm using delphi 2009's TRibbon component. certain pages are not relevant depending on the application state. how can i hide a TRibbon page?
RibbonPage1.Visible:=false doesn't really hide the page...
is this maybe not allowed by the spec from microsoft?
thank you for you help!
mp
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我不认为您可以隐藏各个功能区页面,但您可以隐藏或禁用各个 RibbonGroups 在每个页面上。
Microsoft Office 禁用与当前状态不相关的任何组。 请参阅文档中的这些文章以获得更多帮助。
I do not think you can hide the individual ribbon pages, but you can hide or disable the individual RibbonGroups on the each page.
Microsoft Office disables any groups which are not relevant to the current state. Have a look at these articles from the documentation for more help.
您目前无法执行此操作。 选项卡(而不是页面)需要支持可见性,但它们根本不支持。
如果您尝试操作选项卡本身,您会发现代码非常依赖于维护页面和选项卡之间的链接,甚至会破坏页面。 我不认为有一个好的解决方法。
在 Quality Central 中将其注册为错误。 对“上下文”感知选项卡/页面的支持绝对是应该支持的。 我想还有不少其他人会投票支持它。
You can't do this presently. It is the Tabs (not the Pages) that need to support visibility and they simply do not.
If you try to manipulate the Tabs themselves you will find the code is very dependent on maintaining the linkage between the pages and the tabs to the point of destroying your pages. I don't think there is a good workaround.
Register it as a bug in Quality Central. Support for "Context" aware tabs/pages is definitely something that should be supported. I imagine quite a few others would vote for it.
事实上,这是唯一被那个 borland 废话正确处理的隐藏/显示的东西。
MainRibbon.RemoveTab('TabName');
我现在正在寻找如何隐藏团体和个人行为。 Visible = false 是不行的,尝试将表单调整得更小,并且在折叠状态下一切仍然存在。
In fact this is the only hide/show thing that is handled correctly by that piece of borland crap.
MainRibbon.RemoveTab('TabName');
I am now searching how to hide group and individual actions. Visible = false is not ok, try to resize your form smaller and in the collapsed state all is still there.
也许,试试这个:RibbonPage1.Free;
maybe, try this: RibbonPage1.Free;
试试这个:(Delphi XE6)
然后你可以通过以下方式使其再次可见
Try this: (Delphi XE6)
Then you can make it visible again by