Table of Contents

Class TileView

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

A View consisting of a moveable bar that divides the display area into resizeable Tiles.

public class TileView : View, IDisposable, ISupportInitializeNotification, ISupportInitialize
Inheritance
TileView
Implements
Inherited Members

Constructors

TileView()

Creates a new instance of the TileView class with 2 tiles (i.e. left and right).

TileView(int)

Creates a new instance of the TileView class with tiles number of tiles.

Properties

LineStyle

The line style to use when drawing the splitter lines.

Orientation

Orientation of the dividing line (Horizontal or Vertical).

SplitterDistances

The splitter locations. Note that there will be N-1 splitters where N is the number of Tiles.

Tiles

The sub sections hosted by the view

ToggleResizable

The keyboard key that the user can press to toggle resizing of splitter lines. Mouse drag splitting is always enabled.

Methods

Dispose(bool)

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetParentTileView()

Returns the immediate parent TileView of this. Note that in case of deep nesting this might not be the root TileView. Returns null if this instance is not a nested child (created with TrySplitTile(int, int, out TileView))

IndexOf(View, bool)

Returns the index of the first Tile in Tiles which contains toFind.

InsertTile(int)

Adds a new Tile to the collection at idx. This will also add another splitter line

IsRootTileView()

true if TileView is nested within a parent TileView e.g. via the TrySplitTile(int, int, out TileView). false if it is a root level TileView.

OnDrawComplete()

Called when the View is completed drawing.

OnDrawingBorderAndPadding()

Overridden so no Frames get drawn

OnKeyDownNotHandled(Key)

Called when the user has pressed key it wasn't handled by KeyDown and was not bound to a key binding.

OnRenderingLineCanvas()

Called when the LineCanvas is to be rendered. See RenderLineCanvas().

OnSplitterMoved(int)

Raises the SplitterMoved event

RebuildForTileCount(int)

Scraps all Tiles and creates count new tiles in orientation Orientation

RemoveTile(int)

Removes a Tiles at the provided idx from the view. Returns the removed tile or null if already empty.

SetSplitterPos(int, Pos)

Attempts to update the SplitterDistances of line at idx to the new value. Returns false if the new position is not allowed because of MinSize, location of other splitters etc.

Only absolute values (e.g. 10) and percent values (i.e. Percent(int)) are supported for this property.

TrySplitTile(int, int, out TileView)

Converts of Tiles element idx from a regular View to a new nested TileView the specified numberOfPanels. Returns false if the element already contains a nested view.

Events

SplitterMoved

Invoked when any of the SplitterDistances is changed.