AnnSetAutoMenuItemEnable example for Delphi
procedure TForm1.Button1Click(Sender: TObject);
begin
//disable the Delete menu item from all the selected objects
LEADAnn1.AnnSetAutoMenuItemEnable ( LEADAnn1.AnnContainer, 0, ANNAUTOTEXT_MENU_DELETE, ANNMENU_DISABLED, ANNFLAG_RECURSE + ANNFLAG_SELECTED, '' ) ;
//disable the Delete menu item from all the ellipse objects
LEADAnn1.AnnSetAutoMenuItemEnable ( LEADAnn1.AnnAutomation, ANNOBJECT_ELLIPSE, ANNAUTOTEXT_MENU_DELETE, ANNMENU_DISABLED, 0, '' );
end;