Table of Contents

Property Arrangement

Namespace
Terminal.Gui.ViewBase
Assembly
Terminal.Gui.dll

Arrangement

Gets or sets the user actions that are enabled for the arranging this view within it's SuperView.

public ViewArrangement Arrangement { get; set; }

Property Value

ViewArrangement

Examples

This example demonstrates how to create a resizable splitter between two views using LeftResizable:

// Create left pane that fills remaining space
View leftPane = new ()
{
    X = 0,
    Y = 0,
    Width = Dim.Fill (Dim.Func (_ => rightPane.Frame.Width)),
    Height = Dim.Fill (),
    CanFocus = true
};

// Create right pane with resizable left border (acts as splitter)
View rightPane = new ()
{
    X = Pos.Right (leftPane) - 1,
    Y = 0,
    Width = Dim.Fill (),
    Height = Dim.Fill (),
    Arrangement = ViewArrangement.LeftResizable,
    BorderStyle = LineStyle.Single,
    SuperViewRendersLineCanvas = true,
    CanFocus = true
};
rightPane.Border!.Thickness = new (1, 0, 0, 0); // Only left border

container.Add (leftPane, rightPane);

The right pane's left border acts as a draggable splitter. The left pane's width automatically adjusts to fill the remaining space using Dim.Fill with a function that subtracts the right pane's width.

Remarks

See the View Arrangement Deep Dive for more information: https://gui-cs.github.io/Terminal.Gui/docs/arrangement.html