Function TWPObjectEnv.InsertMovableImage(wpobj:TWPObject) : TWPTextObj

Unit: WPRTEDefs
Class: WPRTEDefs.TWPObjectEnv

Parameters

Returns

The type of the result value is TWPTextObj.

Description

This function can be used to insert a TWPObject instance quickly which shold be handled as movable image object. The inserted objects will then belong to the text. It will be freed at once if it is impossible to insert it. Please don't forget to assign a width and a height to the object before it is inserted.

This example inserts a graphic which fills the complete page. var wpobj : TWPObject; begin wpobj:=WPLoadObjectFromFile(WPRichText1, 'c:\test.emf', false); with WPRichText1.TextObjects.InsertMovableImage( wpobj ) do begin PositionMode:= wpotPage; Wrap:=wpwrNone; Width:=WPRichText1.Header.PageWidth; Height:=WPRichText1.Header.PageHeight; end; WPRichText1.InputString(#12); end;