GridChildPositionInfo
struct cAlgo.API Since 5.4
DesktopCLICloud
Represents a Grid panel child position info.
Definition
public sealed struct GridChildPositionInfo : ValueType
Namespace: cAlgo.API · Group: Grid
Examples
var grid = new Grid(2, 2);
var header = new TextBlock { Text = "EURUSD" };
grid.AddChild(header, 0, 0, 1, 2);
Chart.AddControl(grid);
var position = grid.GetChildPosition(header);
if (position.HasValue)
Print("Row {0}, column {1}, column span {2}", position.Value.Row, position.Value.Column, position.Value.ColumnSpan);
grid = Grid(2, 2)
header = TextBlock()
header.Text = "EURUSD"
grid.AddChild(header, 0, 0, 1, 2)
api.Chart.AddControl(grid)
position = grid.GetChildPosition(header)
if position is not None:
api.Print(f"Row {position.Row}, column {position.Column}, column span {position.ColumnSpan}")
Properties
| Name | Description |
|---|---|
ColumnDesktopCLICloudint | Gets column number of child. |
ColumnSpanDesktopCLICloudint | Gets column span of child. |
RowDesktopCLICloudint | Gets row number of child. |
RowSpanDesktopCLICloudint | Gets row span of child. |