From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Clipboard.RawDataAvailable(DataType as String) As Boolean

Supported on Desktop.

Returns True if the Clipboard contains data.


The DataType parameter supports both the older MacType and newer UTIs. If the DataType parameter is exactly 4 bytes then it is treated as a MacType for backwards compatibility. Otherwise it is treated as a UTI.

On Windows you can use the a special DataType called "HTML Format" to add or fetch HTML data from the clipboard[1].

Sample Code

The following code checks the RawDataAvailable flag prior to reading the contents of the Clipboard.

If c.RawDataAvailable("public.text") Then
TextField1.Text = c.RawData("public.text")
End If

See Also

UserGuide:Uniform Type Identifiers topic