ToggleButton.Text
property · ToggleButton · 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;}
toggleButton.Text: str
Returns string
Examples
var toggleButton = new ToggleButton { Text = "Trading: OFF" };
toggleButton.Checked += args => args.ToggleButton.Text = "Trading: ON";
toggleButton.Unchecked += args => args.ToggleButton.Text = "Trading: OFF";
Chart.AddControl(toggleButton);
toggleButton = ToggleButton()
toggleButton.Text = "Trading: OFF"
api.Chart.AddControl(toggleButton)
api.Print(f"Toggle button text: {toggleButton.Text}")