# Sandbox.UI.BaseTreeView

A virtualized tree. Holds the flat list of visible rows, a pool of [Sandbox.UI.TreeRow](/api/Sandbox.UI.TreeRow) panels
that are rebound as it scrolls, and all the index-based input handling. Knows nothing about the
items themselves - [Sandbox.UI.TreeView<T>](/api/Sandbox.UI.TreeView<T>) supplies those.

- Kind: class
- Namespace: `Sandbox.UI`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.UI.Panel](/api/Sandbox.UI.Panel)
- Modifiers: abstract

## Properties

- [`ActiveRowCount`](/api/Sandbox.UI.BaseTreeView/ActiveRowCount): Number of row panels currently bound to a row.
- [`AnchorRow`](/api/Sandbox.UI.BaseTreeView/AnchorRow): Where a shift-selection ranges from, or -1.
- [`BindCount`](/api/Sandbox.UI.BaseTreeView/BindCount): How many times a row panel has been bound. Goes up on scroll and rebuild, never per frame.
- [`CursorRow`](/api/Sandbox.UI.BaseTreeView/CursorRow): The row keyboard navigation moves from, or -1.
- [`HighlightFadeTime`](/api/Sandbox.UI.BaseTreeView/HighlightFadeTime): How long the highlight takes to fade out, in seconds. Styled by the `highlight-fade` class.
- [`HighlightTime`](/api/Sandbox.UI.BaseTreeView/HighlightTime): How long [Sandbox.UI.BaseTreeView.HighlightRow](/api/Sandbox.UI.BaseTreeView/HighlightRow) holds before it fades, in seconds.
- [`IndentWidth`](/api/Sandbox.UI.BaseTreeView/IndentWidth): Extra left padding per level of depth.
- [`IsDragging`](/api/Sandbox.UI.BaseTreeView/IsDragging): True while one of our rows is being dragged. The tree carries the `dragging` class.
- [`NeedsRebuild`](/api/Sandbox.UI.BaseTreeView/NeedsRebuild): Rebuild the flat row list on the next tick.
- [`OverscanRows`](/api/Sandbox.UI.BaseTreeView/OverscanRows): Rows above and below the viewport that stay bound, so fast scrolls don't flash empty.
- [`PooledRowCount`](/api/Sandbox.UI.BaseTreeView/PooledRowCount): Number of row panels alive, bound or pooled.
- [`RowCount`](/api/Sandbox.UI.BaseTreeView/RowCount): Number of rows currently reachable through open parents.
- [`RowHeight`](/api/Sandbox.UI.BaseTreeView/RowHeight): Height of a row when the tree has no per-item height.

## Methods

- [`BeginRename`](/api/Sandbox.UI.BaseTreeView/BeginRename): Start renaming a row's label in place, scrolling it into view first if needed.
- [`ClearSelection`](/api/Sandbox.UI.BaseTreeView/ClearSelection): Drop the selection, keeping the cursor.
- [`GetParentRow`](/api/Sandbox.UI.BaseTreeView/GetParentRow): The nearest row above with one less depth, or -1 for a root.
- [`GetRowDepth`](/api/Sandbox.UI.BaseTreeView/GetRowDepth): Depth of a row, roots being zero.
- [`GetRowPanel`](/api/Sandbox.UI.BaseTreeView/GetRowPanel): The bound panel for a row, or null if it isn't in the viewport.
- [`GetSubtreeEnd`](/api/Sandbox.UI.BaseTreeView/GetSubtreeEnd): One past the last row inside this row's subtree.
- [`HighlightRow`](/api/Sandbox.UI.BaseTreeView/HighlightRow): Flash a row so the eye finds it: the `highlight` class for [Sandbox.UI.BaseTreeView.HighlightTime](/api/Sandbox.UI.BaseTreeView/HighlightTime), then `highlight-fade` for [Sandbox.UI.BaseTreeView.HighlightFadeTime](/api/Sandbox.UI.BaseTreeView/HighlightFadeTime).
- [`MoveCursor`](/api/Sandbox.UI.BaseTreeView/MoveCursor): Move the cursor by some rows, selecting (or range-selecting with shift) where it lands.
- [`OnButtonEvent`](/api/Sandbox.UI.BaseTreeView/OnButtonEvent)
- [`OnHotloaded`](/api/Sandbox.UI.BaseTreeView/OnHotloaded)
- [`RebindRows`](/api/Sandbox.UI.BaseTreeView/RebindRows): Re-run [Sandbox.UI.BaseTreeView.BindRow](/api/Sandbox.UI.BaseTreeView/BindRow) on every bound row without rebuilding the row list.
- [`Rebuild`](/api/Sandbox.UI.BaseTreeView/Rebuild): Rebuild everything now instead of waiting for the next tick.
- [`ScrollToRow`](/api/Sandbox.UI.BaseTreeView/ScrollToRow): Scroll the least amount that brings this row fully into view.
- [`SelectRow`](/api/Sandbox.UI.BaseTreeView/SelectRow): Select a row the way a click would: plain replaces, ctrl toggles, shift ranges from the anchor.
- [`Tick`](/api/Sandbox.UI.BaseTreeView/Tick)
- [`ToggleRow`](/api/Sandbox.UI.BaseTreeView/ToggleRow): Open or close a row. Shift-click on the expander does it recursively.
