简体   繁体   English

在TToolBar中添加按钮到可用列表自定义

[英]Adding buttons to available list in TToolBar customize

TToolBar has a property called Customizable which when set to true enables customize editor - by double-clicking TToolBar (which opens ToolBar Customize window). TToolBar有一个名为Customizable的属性,当设置为true时,启用自定义编辑器 - 双击TToolBar (打开ToolBar Customize窗口)。

I have some issues with that window: 我在那个窗口遇到了一些问题:

How can I add buttons to list on the left (available buttons), tried modifying properties of already added buttons but haven't found property that may control this. 如何在左侧列表中添加按钮(可用按钮),尝试修改已添加按钮的属性但未找到可控制此属性的属性。 MSDN explains I need to add buttons myself but doesn't specify how. MSDN解释说我需要自己添加按钮但不指定方式。

The way to populate the available buttons of the dialog is to handle the OnCustomizeNewButton event. 填充对话框的可用按钮的方法是处理OnCustomizeNewButton事件。 In fact in general, the Delphi interface to the toolbar customization facilities is made available through the various OnCustomizeXXX events. 实际上,通常,工具栏自定义工具的Delphi接口可通过各种OnCustomizeXXX事件提供。

I've not found any Embarcadero code sample for customisation. 我没有找到任何用于定制的Embarcadero代码示例。 The only Delphi specific resource that I have discovered is this post from Fabio Lucarelli: http://users.skynet.be/oleole/Internet_Explorer_UI.htm 我发现的唯一Delphi特定资源是Fabio Lucarelli的这篇文章: http//users.skynet.be/oleole/Internet_Explorer_UI.htm

I suggest that you use Fabio's post, the VCL source code, and the MSDN documentation that you linked to in the example. 我建议您使用Fabio的帖子,VCL源代码以及您在示例中链接到的MSDN文档。 These information sources should be ample to make forward progress. 这些信息来源应该足以取得进展。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM