Table of Contents

Constructor TreeTableSource

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

TreeTableSource(TableView, string, TreeView<T>, Dictionary<string, Func<T, object>>)

Creates a new instance of TreeTableSource<T> presenting the given tree. This source should only be used with table.

public TreeTableSource(TableView table, string firstColumnName, TreeView<T> tree, Dictionary<string, Func<T, object>> subsequentColumns)

Parameters

table TableView

The table this source will provide data for.

firstColumnName string

Column name to use for the first column of the table (where the tree branches/leaves will be rendered.

tree TreeView<T>

The tree data to render. This should be a new view and not used elsewhere (e.g. via Add(View?)).

subsequentColumns Dictionary<string, Func<T, object>>

Getter methods for each additional property you want to present in the table. For example:

 new () {
    { "Colname1", (t)=>t.SomeField},
    { "Colname2", (t)=>t.SomeOtherField}
}