ImageEn, unit iesettings




property OnAddPopupMenuItem: TIEAddButtonEvent;


Add this event to your code to customize the items that are added to ImageEn popup menus.
You can use the popup menu properties, such as ImageEditingPopupMenu to specify groups of items that are added to the popup menu, but the OnAddPopupMenuItem event allows you to include or exclude specific items.
The event occurs once for each item specified by the popup menu 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().OnAddPopupMenuItem := nil;


IEGlobalSettings().OnAddPopupMenuItem := AddPopupMenuItem;

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

See Also

- ImageEditingPopupMenu
- ImageSelectionPopupMenu
- ImageViewingPopupMenu
- LayerEditingPopupMenu
- LayerSelectionPopupMenu
- PdfEditingPopupMenu
- PdfViewingPopupMenu
- PopupMenuImageHue