| 4D v18SET PICTURE TO PASTEBOARD | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|  | 
    4D v18
 SET PICTURE TO PASTEBOARD 
         | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SET PICTURE TO PASTEBOARD ( picture ) | ||||||||
| Parameter | Type | Description | ||||||
| picture | Picture |   | Picture to be placed in pasteboard | |||||
SET PICTURE TO PASTEBOARD clears the pasteboard and puts a copy of the picture passed in picture into it.
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.).
After you have put a picture into the pasteboard, you can retrieve it using the GET PICTURE FROM PASTEBOARD command or for example GET PASTEBOARD DATA("com.4d.private.picture.gif";...).
Using a floating window, you display a form that contains the array asEmployeeName, which lists the names of the employees from an [Employees] table. Each time you click on a name, you want to copy the employee's picture to the pasteboard. In the object method for the array, you write:
 If(asEmployeeName#0)
    QUERY([Employees];[Employees]Last name=asEmployeeName{asEmployeeName})
    If(Picture size([Employees]Photo)>0)
       SET PICTURE TO PASTEBOARD([Employees]Photo) ` Copy the employee's photo
    Else
       CLEAR PASTEBOARD ` No photo or no record found
    End if
 End ifIf a copy of the picture is correctly put into the pasteboard, the OK variable is set to 1.
If there is not enough memory to paste the picture into the pasteboard, the OK variable is set to 0, but no error is generated.
	Product:  4D
	Theme:  Pasteboard
	Number:  
        521
        
        
        
	
	Modified:  4D v11 SQL  
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v18)
	
	
	
	
	
 Add a comment
Add a comment