Syntax 1 For text
Description
Retrieves or replaces the contents of the system clipboard
with text.
Syntax
|
1 |
<span>Clipboard</span> ( { <span>string</span> } ) |
|
Argument |
Description |
|---|---|
|
string (optional) |
A string whose value is the text you |
Return Values
String. Returns the current contents
of the clipboard if the clipboard contains text. If string is
specified, Clipboard returns the current contents
and replaces it with string.
Returns the empty string (“”) if the clipboard is empty or
it contains nontext data, such as a bitmap. If string is
specified, the nontext data is replaced with string.
If string is null, Clipboard returns null.
Usage
You can use Syntax 1 with the Paste, Replace,
or ReplaceText function to insert the clipboard
contents in an editable control or StaticText control.
Calling Clipboard in a DataWIndow control or DataStore object
To retrieve or replace the contents of the system clipboard
with text from a DataWindow item (cell value), you must first assign
the value to a string and then call the system Clipboard function
as follows:
|
1 |
string ls_data = dw_1.object.<span>column_name</span>[<span>row_number</span>] |
|
1 |
::Clipboard(ls_data) |
The DataWindow version of Clipboard, documented
in Syntax 2 (and in the DataWindow Reference),
is only applicable to graphs.
Examples
These statements put the contents of the clipboard
in the variable ls_CoName:
|
1 |
string ls_CoName |
|
1 |
ls_CoName =<span> Clipboard</span>() |
The following statements place the contents of the
clipboard in Heading, and then replace the
contents of the clipboard with the string Employee Data:
|
1 |
string Heading |
|
1 |
Heading = <span>Clipboard</span>("Employee Data") |
The following statement replaces the selected text
in the MultiLineEdit mle_terms with
the contents of the clipboard:
|
1 |
mle_terms.ReplaceText(<span>Clipboard</span>()) |
The following statement exchanges the contents of
the StaticText st_welcome with the
contents of the clipboard:
|
1 |
st_welcome.Text = <span>Clipboard</span>(st_welcome.Text) |