Clipboard.SetText
method · Clipboard · cAlgo.API Since 5.8
DesktopCLICloud
Stores text data on the Clipboard.
Environment behaviour
CLI — not supported. SetText does nothing; GetText returns an empty string. No exception is thrown.
Cloud — not supported. SetText does nothing; GetText returns an empty string. No exception is thrown.
Definition
void SetText(string text)
api.Clipboard.SetText(text: str) -> None
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
text | string | str | A string that contains the text data to store on the Clipboard. |
Examples
var position = Positions.FirstOrDefault();
if (position != null)
Clipboard.SetText(position.Id.ToString());
if api.Positions.Count > 0:
api.Clipboard.SetText(str(api.Positions[0].Id))