ImageEn, unit iexToolbars

TCustomImageEnToolbar.OnAddButton

TCustomImageEnToolbar.OnAddButton


Declaration

property OnAddButton: TIEAddButtonEvent;


Description

Event that allows in-depth customization of the buttons added to the toolbar.
You can use the Buttons property to specify groups of buttons that are added to the toolbar, but the OnAddButton 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: You can alternatively use the global event, OnAddToolbarButton


Example

procedure TMainForm.ImageEnViewToolbar1AddButton(Sender: TObject; ToolbarID: Integer; ButtonID: Integer; var Include: Boolean);
begin
  // Hide Zoom box and the 100% button (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 OnAddButton only occurred for buttons specified by Buttons. From 12.0.5, OnAddButton occurs for every button with the initial value of Include determining its default state.


See Also

 OnAddToolbarButton
 ImageEditingToolbar
 ImageSelectionToolbar
 ImageViewingToolbar
 LayerEditingToolbar
 LayerSelectionToolbar
 PdfEditingToolbar
 PdfViewingToolbar