GET PICTURE FROM PASTEBOARD

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 11 (Modified)


GET PICTURE FROM PASTEBOARD (picture)

ParameterTypeDescription
picturePicturePicture extracted from pasteboard

Description

GET PICTURE FROM PASTEBOARD returns the picture present in the pasteboard into the picture field or variable.

Note: In the case of copy/paste operations, the pasteboard is equivalent to the Clipboard.

The picture is transported in its native format (jpeg, tif, png, etc.). When the destination area accepts native formats, the picture keeps its format; otherwise it is converted to the PICT format.

Example

The following button's object method assigns the picture (jpeg or gif format) present in the pasteboard (if any) to the field [Employees]Photo:

   If ((Pasteboard data size("com.4d.private.picture.jpeg")>0) | (Pasteboard data size("com.4d.private.picture.gif")>0))
      GET PICTURE FROM PASTEBOARD([Employees]Photo)
   Else
      ALERT ("The pasteboard does not contain any pictures.")
   End if

See Also

GET PASTEBOARD DATA, Get text from pasteboard, Pasteboard data size.

System Variables

If the picture is correctly extracted, OK is set to 1; otherwise OK is set to 0.

Error Handling

If there is not enough memory to extract the picture, an error -108 is generated.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next