ImageEn, unit iesettings

TIEImageEnGlobalSettings.OnAddToolbarButton

TIEImageEnGlobalSettings.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.
The event occurs once for each button specified by the Buttons property.
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;


See Also

- OnAddButton
- ImageEditingToolbar
- ImageSelectionToolbar
- ImageViewingToolbar
- LayerEditingToolbar
- LayerSelectionToolbar
- PdfEditingToolbar
- PdfViewingToolbar
- ToolbarsAllowExtraControls
- AutoToolbars