Clipboard.Text

From Xojo Documentation

Revision as of 18:27, 17 December 2020 by PLefebvre (talk | contribs) (Added project compatibility)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As String )
aClipboard.Text = newStringValue
or
StringValue = aClipboard.Text

Supported on Desktop, Mobile (iOS).

The text on the Clipboard.

Sample Code

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

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.Value = c.Text
End If

// close it
c.Close