IClipboard.HasText

Syntax

HasText: Boolean;

Description

The HasText method returns whether there is text information in the clipboard.

Example

Executing the example requires a form and a button named Button1 on it.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Cl: Clipboard;

Begin

Cl := New Clipboard.Create;

If Cl.HasText Then

Debug.WriteLine(Cl.Text);

End If;

End Sub Button1OnClick;

After executing the example on pressing the button, if there is text information in the clipboard, it is displayed in the development environment console.

See also:

IClipboard