[英]Delphi: Styled TMainMenu and TToolBar in TCoolBar
I'm attempting to create an application menu and toolbar in Delphi XE3 that looks like the following (from a program I have): 我试图在Delphi XE3中创建一个应用程序菜单和工具栏,如下所示(从我拥有的程序中):
I'm able to replicate a portion of this look by doing the following: 通过执行以下操作,我可以复制此外观的一部分:
TMainMenu
and insert template menus for File/Edit/etc. TMainMenu
并为文件/编辑/等插入模板菜单。 TCoolBar
to the form TCoolBar
添加到窗体 TToolBar
to the TCoolBar
TToolBar
添加到TCoolBar
TToolButton
to the TToolBar
for each of File/Edit/etc. TToolButton
到TToolBar
。 and choose the Group property TToolButton
to the corresponding File/Edit/etc. TToolButton
的MenuItem属性分配给相应的File / Edit / TToolButton
TToolBar
to the TCoolBar
beneath the first one TToolBar
添加到第一个中的TCoolBar
Here's what it looks like: 看起来是这样的:
It's somewhat similar but is still missing all the style elements to modify the look of the new application menu. 它有些相似,但是仍然缺少所有样式元素来修改新应用程序菜单的外观。
My question is, does anyone know of how to achieve a similar look, perhaps with a third-party component library? 我的问题是,有没有人知道如何通过第三方组件库获得相似的外观? It seems likely that the original developer used a third-party VCL library.
原始开发人员似乎使用了第三方VCL库。 I'd like the drop shadow in addition to the styled menus and
TCoolBar
. 除了样式菜单和
TCoolBar
之外,我还想添加阴影。
I've tried Raize Components, TMS Advanced Toolbars & Menus, and am in the process of trying DevExpress VCL components. 我已经尝试过Raize Components,TMS Advanced Toolbars和Menus,并且正在尝试DevExpress VCL组件。 None of them seem to provide a solution, but perhaps I'm not familiar enough with them yet to figure it out.
他们似乎都没有提供解决方案,但也许我对他们还不了解,还没有找到解决方案。
Delphi has come with an ActionBands
demo that can show you how to obtain this appearance "out of the box" for your menus using TActionMainMenuBar
(and TActionToolBar
). Delphi附带了一个
ActionBands
演示,该演示可以向您展示如何使用TActionMainMenuBar
(和TActionToolBar
)为菜单获得“现成的”外观。 Just change the Style
menu to XP Style
in the demo: 只需在演示中将“
Style
菜单更改为“ XP Style
”:
The rest of your steps seem pretty well complete. 您的其余步骤似乎都已经完成。 For the images on the menu items and toolbar buttons, see the use of
ImageList
components in association with the TActions
on the menu and toolbar in the demo. 有关菜单项和工具栏按钮上的图像,请参见结合使用
ImageList
组件和演示中菜单和工具栏上的TActions
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.