简体   繁体   中英

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).

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.

The way to populate the available buttons of the dialog is to handle the OnCustomizeNewButton event. In fact in general, the Delphi interface to the toolbar customization facilities is made available through the various OnCustomizeXXX events.

I've not found any Embarcadero code sample for customisation. The only Delphi specific resource that I have discovered is this post from 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. These information sources should be ample to make forward progress.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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