How To…Add a Button to the Preview


“How do I add a custom button to the preview toolbar?”


Create a Preview Plugin that overrides the CreateToolbarItems routine. Use the Toolbar.AddButton routine to add a new button to the toolbar before the default buttons are created. Take a look at the TppPreview.CreateToolbarItems routine located in the ppPreview.pas file for examples of how the existing buttons are created.


Sample Delphi code: