TextBlock.Text
property · TextBlock · 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;}
textBlock.Text: str
Returns string
Examples
var textBlock = new TextBlock();
textBlock.Text = string.Format("Spread: {0:F1} pips", Symbol.Spread / Symbol.PipSize);
Chart.AddControl(textBlock);
Print(textBlock.Text);
textBlock = TextBlock()
textBlock.Text = f"Spread: {api.Symbol.Spread / api.Symbol.PipSize:.1f} pips"
api.Chart.AddControl(textBlock)
api.Print(textBlock.Text)