API ReferenceSandbox.UI

Tabclass

A selectable tab belonging to a `Sandbox.UI.TabBar`.

object→Panel→Tab
Namespace
Sandbox.UI
Assembly
Sandbox.Engine
Declaration
public class Sandbox.UI.Tab : Sandbox.UI.Panel

Constructors1

Showing 1 constructors

public Tab()PUBLICCONSTRUCTOR

Methods10

Showing 10 methods

public virtual void OnButtonTyped(Sandbox.UI.ButtonEvent e)PUBLICVIRTUAL

ParameterTypeDescription
eButtonEvent—
Returns:void—

public virtual void OnDeleted()PUBLICVIRTUAL

Returns:void—

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

ParameterTypeDescription
eDragEvent—
Returns:void—

protected virtual void OnDragCancel(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 OnDragStart(Sandbox.UI.DragEvent e)PROTECTEDVIRTUALLIFECYCLE

ParameterTypeDescription
eDragEvent—
Returns:void—

Properties10

Showing 10 properties

public Sandbox.UI.TabBar Sandbox.UI.Tab.Bar { get; set; }PUBLICGETSET

The bar containing this tab.

Returns:TabBar—

public System.Action`1<Sandbox.UI.Menu> Sandbox.UI.Tab.BuildContextMenu { get; set; }PUBLICGETSET

Populate the right-click menu. A Close option is supplied for closable tabs.

Returns:Action<Menu>—

public bool Sandbox.UI.Tab.CanClose { get; set; }PUBLICGETSET

Whether to show the close button and allow middle-click closing.

Returns:bool—

public System.Nullable`1<int> Sandbox.UI.Tab.Count { get; set; }PUBLICGETSET

Optional count badge. Null hides the badge; zero is displayed.

Returns:Nullable<int>—

public string Sandbox.UI.Tab.Icon { get; set; }PUBLICGETSET

Optional Material icon.

Returns:string—

public Sandbox.Texture Sandbox.UI.Tab.IconTexture { get; set; }PUBLICGETSET

Optional texture, taking precedence over the icon. The caller owns the texture.

Returns:Texture—

public bool Sandbox.UI.Tab.IsIconOnly { get; set; }PUBLICGETSET

Whether the bar is currently hiding this tab's title to save space.

Returns:bool—

public bool Sandbox.UI.Tab.Selected { get; set; }PUBLICGETSET

Whether this is the selected tab.

Returns:bool—

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

Text displayed on the tab.

Returns:string—

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

Returns:bool—

On this page