TE Edit Control Java / HTML-JavaScript Help
Product page

TerInsertPictureFile

Embed or link a bitmap or a metafile from a disk file.

int TerInsertPictureFile( FileName, embed, align, insert)
int TerInsertPictureFileXY( FileName, embed, align, insert, x, y)
int TerInsertPictureFileXY2( FileName, embed, align, insert, PageRelative, x2, y2)
String FileName;Name of the disk image file.
boolean embed;true to embed the picture in the document file, false to create a link to the picture file.
int align;picture alignment relative to the baseline of the text: ALIGN_BOT (default), ALIGN_TOP, ALIGN_MIDDLE.
boolean insert;true to insert the picture into text. false to simply return the picture id without inserting the picture into text.
int x;Pixel X position to insert the picture. This parameter is used by the TerInsertPictureFileXY method only.
int y;Pixel Y position to insert the picture. This parameter is used by the TerInsertPictureFileXY method only.
boolean PageRelative;Set to TRUE to interpret the values of the x2 and y2 relative to the top of the page. Set to FALSE to insert a paragraph-relative picture.
int x2;

When PageRelative parameter is set to TRUE: specify the x position in twips unit relative to the left edge of the page.

When PageRelative parameter is set to FALSE; specify the x position in twips unit relative to the left margin of the page.

This parameter is used by the TerInsertPictureFileXY2 method only.

int y2;

When PageRelative parameter is set to TRUE: specify the y position in twips unit relative to the top edge of the page.

When PageRelative parameter is set to FALSE; specify the y position in twips unit relative to the current paragraph.

This parameter is used by the TerInsertPictureFileXY2 method only.

Description: A file selection dialog box is displayed if the FileName argument is set to null. The TerInsertPictureFile function inserts the picture at the current text position. The TerInsertPictureFileXY function inserts the picture at the pixel location given by the x,y position. The x,y pixel location is relative to the top left corner of the client area of the window. The TerInsertPictureFileXY2 method is used to insert a page or paragraph relative picture.

Return Value: This function returns a non-zero picture id, if successful. Otherwise it returns zero.