ControlBase.IsVisible
property · ControlBase · cAlgo.API
DesktopCLICloud
Gets or sets the value indicating whether this instance of the chart control instance is visible.
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 bool IsVisible {get; set;}
controlBase.IsVisible: bool
Returns bool
Examples
var textBlock = new TextBlock { Text = "No open positions" };
textBlock.IsVisible = Positions.Count == 0;
Chart.AddControl(textBlock);
Print("Visible: {0}", textBlock.IsVisible);
textBlock = TextBlock()
textBlock.Text = "No open positions"
textBlock.IsVisible = api.Positions.Count == 0
api.Chart.AddControl(textBlock)
api.Print(f"Visible: {textBlock.IsVisible}")