Constructor TreeTableSource | Terminal.Gui v2 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
TreeTableSource(TableView, string, TreeView, Dictionary<string, Func<T, object>>)
Creates a new instance of TreeTableSource 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
The tree data to render. This should be a new view and not used elsewhere (e.g. viaAdd(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}
}