Skip to main content
Version: Next

SET TEXT TO PASTEBOARD

SET TEXT TO PASTEBOARD ( text )

ParameterTypeDescription
textTextText to be put into the pasteboard

This command is not thread-safe, it cannot be used in preemptive code.

Description

SET TEXT TO PASTEBOARD clears the pasteboard and then puts a copy of the text you passed in text into the pasteboard.

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

After you have put some text into the pasteboard, you can retrieve it using the Get text from pasteboard command or by calling for example GET PASTEBOARD DATA ("com.4d.private.text.native";...).

4D text expressions can contain up to 2 GB of text*.*

Note: The pasteboard is read only during the On Drag Over form event. It is not possible to use this command in this context.

Example

See the example for the APPEND DATA TO PASTEBOARD command.

System variables and sets

If a copy of the text is correctly placed in the pasteboard, the OK variable is set to 1. If there is not enough memory to place a copy of the text in the pasteboard, the OK variable is set to 0, but no error is generated.

See also

APPEND DATA TO PASTEBOARD
Get text from pasteboard