ImageEn, unit iexToolbars




property OnAddButton: TIEAddButtonEvent;


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


procedure TMainForm.ImageEnViewToolbar1AddButton(Sender: TObject; ToolbarID: Integer; ButtonID: Integer; var Include: Boolean);
  // 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

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