Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

InsertPicture – PB Docs 126 – PowerBuilder Library

InsertPicture – PB Docs 126

InsertPicture PowerScript function

Description

Inserts an image at the insertion point in a RichTextEdit
control.

Controls

RichTextEdit controls

Syntax

Argument

Description

rtename

The name of the RichTextEdit control
in which you want to insert an image

filename

A string whose value is the name of the
file that contains the image

format

An integer whose value determines the
format in which the image is saved in the RTF file. Values are:

  • 1 – BMP

  • 2 – WMF (default)

  • 3 – PNG

  • 4 – JPG

Return Values

Integer. Returns 1 if it succeeds. Returns -2 if the compression
format of a .tif file is not supported and
-1 if a different error occurs. If filename is null, InsertPicture returns null.

Usage

If there is a selection, InsertPicture inserts
the image at the beginning of the selection. The image and the selection
remain selected. The following file types are supported: .bmp,
.wmf, .jpeg, .png,
and .gif. The .tif file
type is also supported if it uses the LZW compression format.

Examples

This example inserts a PNG file at the insertion
point in the RichTextEdit control rte_1.
The PNG file will be saved in the RTF file in WMF format:

This example inserts a JPG file at the insertion
point in the RichTextEdit control rte_1.
The JPG file will be saved in the RTF file in JPG format:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x