InsertPicture
Description
Inserts a picture at the cursor position.
function InsertPicture (const Name: String; gr: TGraphic; VAlign: TRVVAlign = rvvaBaseline): Boolean;
Parameter |
Description |
Name |
Name of this picture item, any string. Name must not contain CR and LF characters. RichEidt does not use Names itself, they are for your own use. |
gr |
Picture to insert. |
VAlign |
Optional parameter. Vertical align of this picture, relative to its line. Available values: rvvaBaseline, rvvaMiddle, rvvaAbsTop, rvvaAbsBottom, rvvaAbsMiddle, rvvaLeft, rvvaRight |
Example
procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
var
Graphic: TGraphic;
begin
Graphic := TJpegImage.Create;
Graphic.LoadFromFile('d:\filename.jpg');
Form1.RichEdit1.InsertPicture('', Graphic);
end;