AnnSetUser Example for Delphi

Note:

This topic is for Document/Medical only.

var
//Global declarations
RasterAnn: LEADRasterAnnotation;
procedure TForm1.Button1Click(Sender: TObject);
begin
   RasterAnn:= CoLEADRasterAnnotation.Create ();
   RasterAnn.AnnParentRasterView := LEADRasterView1.Raster;
   LEADEventSink1.Connect (RasterAnn, _LEADRasterAnnotationEvents);
   RasterAnn.AnnUserMode:= ANN_USERMODE_DESIGN;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
   //hide the selected objects
   RasterAnn.AnnSetVisible (RasterAnn.AnnContainer, False, ANN_FLAG_RECURSE + ANN_FLAG_SELECTED, '');
   //set the selected objects to belong to user XXX
   RasterAnn.AnnSetUser (RasterAnn.AnnContainer, '', 'xxx', True);
end;