API ReferenceSandbox.UI

TreeRowclass

One visible row of a `Sandbox.UI.BaseTreeView`. Rows are pooled and rebound as the tree scrolls, so anything you add to one must be created once and updated on every bind.

objectPanelTreeRow
Namespace
Sandbox.UI
Assembly
Sandbox.Engine
Declaration
public class Sandbox.UI.TreeRow : Sandbox.UI.Panel

Constructors1

Showing 1 constructors

Methods11

Showing 11 methods

public void BeginRename()PUBLIC

Swap the label for a text entry until enter, escape, or focus loss.

Returns:void

protected virtual void OnDrag(Sandbox.UI.DragEvent e)PROTECTEDVIRTUAL

ParameterTypeDescription
eDragEvent
Returns:void

protected virtual void OnDragEnd(Sandbox.UI.DragEvent e)PROTECTEDVIRTUAL

ParameterTypeDescription
eDragEvent
Returns:void

protected virtual void OnDragEnter(Sandbox.UI.PanelEvent e)PROTECTEDVIRTUAL

ParameterTypeDescription
ePanelEvent
Returns:void

protected virtual void OnDragLeave(Sandbox.UI.PanelEvent e)PROTECTEDVIRTUAL

ParameterTypeDescription
ePanelEvent
Returns:void

protected virtual void OnDragStart(Sandbox.UI.DragEvent e)PROTECTEDVIRTUALLIFECYCLE

ParameterTypeDescription
eDragEvent
Returns:void

protected virtual void OnDrop(Sandbox.UI.PanelEvent e)PROTECTEDVIRTUAL

ParameterTypeDescription
ePanelEvent
Returns:void

Properties10

Showing 10 properties

public Sandbox.UI.Panel Sandbox.UI.TreeRow.Content { get; set; }PUBLICGETSET

Where a row's own controls go - toggles, buttons, badges - added once and updated on every bind. Clicks on them belong to them: they don't select or activate the row.

Returns:Panel

public Sandbox.UI.IconPanel Sandbox.UI.TreeRow.Expander { get; set; }PUBLICGETSET

The expand/collapse arrow. Hidden on rows without children.

Returns:IconPanel

public string Sandbox.UI.TreeRow.IconName { get; set; }PUBLICGETSET

Material icon name. Null or empty hides the icon.

Returns:string

public bool Sandbox.UI.TreeRow.IsRenaming { get; set; }PUBLICGETSET

True while the label is swapped for a text entry.

Returns:bool

public Sandbox.UI.Label Sandbox.UI.TreeRow.Label { get; set; }PUBLICGETSET

The row's text.

Returns:Label

public int Sandbox.UI.TreeRow.RowIndex { get; set; }PUBLICGETSET

Index into the tree's flat row list, or -1 while pooled.

Returns:int

public string Sandbox.UI.TreeRow.Text { get; set; }PUBLICGETSET

The row's label text. Only touches the label when it changes.

Returns:string

public virtual bool Sandbox.UI.TreeRow.WantsDrag { get; set; }PUBLICVIRTUALGETSET

Rows drag when the tree says this row can.

Returns:bool

On this page