Skip to content

DockPanel.LastChildFill

property · DockPanel · cAlgo.API

DesktopCLICloud

Indicates whether the last child element within a DockPanel stretches to fill the remaining available space.

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 LastChildFill {get; set;}
dockPanel.LastChildFill: bool

Returns bool

Examples

var dockPanel = new DockPanel { Width = 300, Height = 60, LastChildFill = false };
dockPanel.AddChild(new Button { Text = "Buy", Dock = Dock.Left });
dockPanel.AddChild(new Button { Text = "Sell", Dock = Dock.Left });
Chart.AddControl(dockPanel);
Print("Last child fills: {0}", dockPanel.LastChildFill);
dockPanel = DockPanel()
dockPanel.Width = 300
dockPanel.Height = 60
dockPanel.LastChildFill = False
for text in ["Buy", "Sell"]:
    button = Button()
    button.Text = text
    button.Dock = Dock.Left
    dockPanel.AddChild(button)
api.Chart.AddControl(dockPanel)
api.Print(f"Last child fills: {dockPanel.LastChildFill}")