Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Tab

Creates a tab to organize content on different screens.
Read time 7 minutesLast updated 2 days ago

Definition

public class Tab : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler

Remarks

A Tab has a header that can respond to pointer and mouse events. The header can hold an icon, a label, or both. The Tab content container can hold anything inside of it giving more flexibility to customize its layout.
For more information, refer to UXML element Tab.

Static Fields

Value

Description

closeableUssClassNameThe USS class name for a closeable tab.
closeButtonUssClassNameThe USS class name for close button in closable tabs.
contentUssClassNameUSS class name of container element of this type.
draggingUssClassNameUSS class name for the dragging state of this type.
reorderableItemHandleBarUssClassNameUSS class name for drag handlebar in reorderable tabs.
reorderableItemHandleUssClassNameUSS class name for drag handle in reorderable tabs.
reorderableUssClassNameUSS class name for reorderable tab elements.
tabHeaderEmptyImageUssClassNameUSS class name for the icon inside the header when the value is null.
tabHeaderEmptyLabeUssClassNameUSS class name for the label of the header when the value is empty or null.
tabHeaderImageUssClassNameUSS class name for the icon inside the header.
tabHeaderLabelUssClassNameUSS class name for the label of the header.
tabHeaderStandaloneImageUssClassNameUSS class name for the icon inside the header when the label is empty or null.
tabHeaderUnderlineUssClassNameUSS class name for the active state underline of the header.
tabHeaderUssClassNameUSS class name for the header of this type.
ussClassNameUSS class name of elements of this type.

Constructors

Constructor

Description

Tab()Constructs a Tab.
Tab(System.String)Constructs a Tab.
Tab(System.String,UnityEngine.UIElements.Background)Constructs a Tab.
Tab(UnityEngine.UIElements.Background)Constructs a Tab.

Properties

Property

Description

closeableA property that adds the ability to close tabs.
contentContainerThe container for the content of the Tab.
iconImageSets the icon for the Tab's header.
labelSets the label of the Tab's header.
tabHeaderReturns the Tab's header.

Events

Member

Description

closedThis event is called when a tab has been closed.
closingThis event is called before a tab is closed. Return true if the tab can be closed.
selectedThis event is called when a tab has been selected.

Inheritance

Inherited Members