Skip to content

ControlBase.Width

property · ControlBase · cAlgo.API

DesktopCLICloud

Gets or sets the width of the chart control.

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 double Width {get; set;}
controlBase.Width: float

Returns double — The width.

Examples

var button = new Button { Text = "Close all positions", Width = 160 };
Chart.AddControl(button);
Print("Width: {0}", button.Width);
button = Button()
button.Text = "Close all positions"
button.Width = 160
api.Chart.AddControl(button)
api.Print(f"Width: {button.Width}")