Skip to main content

IdxRichEditShapeCollection.InsertPicture(IdxRichEditDocumentPosition,TGraphic) Method

Inserts a floating picture at the specified position in the parent document.

Declaration

function InsertPicture(const APos: IdxRichEditDocumentPosition; AImage: TGraphic): IdxRichEditShape;

Parameters

Name Type Description
APos IdxRichEditDocumentPosition

The target document position.

AImage TGraphic

The source image container with a bitmap.

Returns

Type Description
IdxRichEditShape

The created floating image.

Remarks

Call the InsertPicture function to insert a floating picture anchored at the beginning of the page that includes the document position passed as the APos parameter.

You can use the returned shape’s Picture property to access the stored picture and customize its settings.

Limitations

  • A floating shape’s Office Image container does not support vector images to ensure compatibility with popular document formats. Ensure that the source image container (a TdxSmartImage or TdxSmartGlyph instance) does not contain an SVG image. Otherwise, an exception occurs.
  • The Rich Edit control does not support nested floating shapes.
See Also