Skip to content

TabItem Class

Contains the header and content of a tab for the TabControl.

C#
public class TabItem

Inheritance object

Creates a new tab item with the specified header as a colored string, and sets the content for the tab.

C#
public TabItem(string header, Panel content)

header string
The header to display on this tab item.

content Panel
The panel content to display for this tab.

ArgumentException
Thrown when the header value is an empty string.

Display text of the header. Also functions as the access key

C#
public string Header { get; set; }

Temporary variable holding the theme state of the tab item header.

C#
public ThemeStates ThemeHeaderStates { get; set; }

Temporary variable holding where on the tab control the header is drawn.

C#
public Rectangle ThemeHeaderArea { get; set; }

Temporary variable holding where on the tab control the mouse is tracked for this header.

C#
public Rectangle ThemeHeaderMouseArea { get; set; }

The content of this tab item.

C#
public Panel Content { get; set; }

The size in cells to allocate for displaying the header.

-1
indicates that the tab should be automatically sized to fit the size of the Header.

C#
public int TabSize { get; set; }

Padding to add around the Header text when TabSize is unset (-1).

C#
public int AutomaticPadding { get; set; }

If TabSize is any value other than

-1
, the Header is aligned according to this property.

C#
public HorizontalAlignment TextAlignment { get; set; }