Table of Contents

Property ColorGetter

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

ColorGetter

Delegate for basic multi-colored tree view use cases. Return the Scheme to use for each passed object, or null to use the default tree view scheme.

public Func<T, Scheme?>? ColorGetter { get; set; }

Property Value

Func<T, Scheme>

Remarks

TreeView uses only Normal, Focus, and Active from the returned scheme.

  • NormalUsed for unselected branches.
  • FocusUsed for selected branches when the tree view has focus.
  • ActiveUsed for selected branches when the tree view does not have focus.

For greater control over rendering, handle the DrawLine event instead.