Skip to content

ControlBase.Top

property · ControlBase · cAlgo.API

DesktopCLICloud

Gets or sets the position of the chart control to the top of the chart area. Works only when the control is inside the Canvas panel.

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

Returns double — The top.

Examples

var canvas = new Canvas();
var button = new Button { Text = "Buy", Left = 10, Top = 50 };
canvas.AddChild(button);
Chart.AddControl(canvas);
Print("Top: {0}", button.Top);
canvas = Canvas()
button = Button()
button.Text = "Buy"
button.Left = 10
button.Top = 50
canvas.AddChild(button)
api.Chart.AddControl(canvas)
api.Print(f"Top: {button.Top}")