ImageEn, unit iesettings

TIEGlobalSettings.OnAddToolbarButton

TIEGlobalSettings.OnAddToolbarButton


Declaration

property OnAddToolbarButton: TIEAddButtonEvent;


Description

Add this event to your code to customize the buttons that are added to ImageEn toolbars.
You can use the Buttons of toolbars, such as ImageEditingToolbar to specify groups of buttons that are added to the toolbar, but the OnAddToolbarButton event allows you to include or exclude specific buttons.
ToolbarID is a const from ImageEn Toolbar IDs.
ButtonID is a const from ImageEn Toolbar Button IDs.

Note: Ensure you reset this event before destroying your form, e.g. IEGlobalSettings().OnAddToolbarButton := nil;


Example

IEGlobalSettings().OnAddToolbarButton := AddToolbarButton;

procedure TMainForm.ImageEnViewToolbar1AddButton(Sender: TObject; ToolbarID: Integer; ButtonID: Integer; var Include: Boolean);
begin
  // Hide Zoom box and the 100% button from all ImageEnView toolbars (only show Zoom In and Zoom Out)
  if ( ButtonID = IEViewZoomBox_Button_ID ) or
     ( ButtonID = IEViewZoomFullSize_Button_ID ) then
    Include := False
end;


Compatibility Information

Prior to v12.0.5 OnAddToolbarButton only occurred for buttons specified by the Buttons property. From 12.0.5, OnAddToolbarButton occurs for every button with the initial value of Include determining its default state.


See Also

OnAddButton
ImageEditingToolbar
ImageSelectionToolbar
ImageViewingToolbar
LayerEditingToolbar
LayerSelectionToolbar
PdfEditingToolbar
PdfViewingToolbar
ToolbarsAllowExtraControls
AutoToolbars