Button.Text
property · Button · cAlgo.API
DesktopCLICloud
Gets or sets the text.
Environment behaviour
CLI — not supported. Accepted without error but never displayed, so control events such as Click are never raised.
Cloud — not supported. Accepted without error but never displayed, so control events such as Click are never raised.
Definition
public string Text {get; set;}
button.Text: str
Returns string
Examples
var button = new Button { Text = "Start trading" };
button.Click += args => args.Button.Text = args.Button.Text == "Start trading" ? "Stop trading" : "Start trading";
Chart.AddControl(button);
button = Button()
button.Text = "Start trading"
api.Chart.AddControl(button)
api.Print(f"Button text: {button.Text}")