From Xojo Documentation

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

Clipboard.TextAvailable() As Boolean

Supported on Desktop.

Returns True if the data on the Clipboard is text.

Sample Code

This code is in the Pressed event of a button. It checks the Clipboard for text. If it finds text, it assigns it to the Text property of the DesktopTextField.

Var c As Clipboard

// create an instance of the clipboard
c = New Clipboard

// check for textAvailable
If c.TextAvailable Then
// text is available, set the TextField to it
TextField1.Text = c.Text
End If

// close it