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.
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;
procedure TMainForm.IEGlobalSettings1AddPopupMenuItem(Sender: TObject; ToolbarID: Integer; ButtonID: Integer; var Include: Boolean); begin // 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 end;
Compatibility Information
Prior to v12.0.5 OnAddPopupMenuItem only occurred for buttons specified by the popup menu property. From 12.0.5, OnAddPopupMenuItem occurs for every button with the initial value of Include determining its default state.