ImageEn, unit iexRichEdit

TIERichEdit.InsertImage

TIERichEdit.InsertImage


Declaration

procedure InsertImage(Bitmap: TIEBitmap; const Sizeable: Boolean = True); overload;
procedure InsertImage(AGraphic: TGraphic; const Sizeable: Boolean = True); overload;
procedure InsertImage(const FileName: string; const Sizeable: Boolean = True); overload;


Description

Insert an image at the current cursor position.
If Sizeable = false, but OLEDragDrop is true, then the user can drag and drop the image, and then resize the image.
Set OLEDragDrop to false to completely prevent the user from resizing the image.


Example

// Insert from TIEBitmap
iebmp := TIEBitmap.Create;
iebmp.LoadFromFile( 'C:\Image.jpg' );
IERichEdit1.InsertImage( iebmp );
iebmp.Free;

// Insert from TImageList (and don't allow to be resized)
bmp := TBitmap.Create;
ImageList1.GetBitmap( 73, bmp );
IERichEdit1.InsertImage( bmp, False );
bmp.Free;