Skip to main content

XtraTabControl.HeaderButtons Property

Gets the options that specify which tab buttons can be displayed within the header panel.

Namespace: DevExpress.XtraTab

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

[DefaultValue(TabButtons.Default)]
[DXCategory("Behavior")]
public virtual TabButtons HeaderButtons { get; set; }

Property Value

Type Default Description
DevExpress.XtraTab.TabButtons Default

A set of DevExpress.XtraTab.TabButtons flags that specify the visibility of tab buttons.

Remarks

The header panel can display the Close, Next and Prev buttons. The Next and Prev buttons enable end-users to scroll through tab pages when the tab control’s width (height) is insufficient to display all the tab pages simultaneously. The HeaderButtons property allows you to specify which buttons are available within the header panel. The XtraTabControl.HeaderButtonsShowMode property specifies when the buttons are made available.

The image below shows the tab control with the Close, Next and Prev buttons displayed.

XtraTabControl_HeaderButtons

Individual tab pages can also display Close buttons, as specified by the XtraTabControl.ClosePageButtonShowMode property. You can implement the functionality for the Close button via the XtraTabControl.CloseButtonClick event.

Use the XtraTabControl.HeaderButtonClick event to override the default functionality for the Next and Prev buttons.

Example

By default, only the Next and Prev buttons are displayed within the tab header panel. The following sample code demonstrates how to enable the DevExpress.XtraTab.TabButtons.Close option so that the Close button can be displayed within the tab header panel as well.

xtraTabControl1.HeaderButtons |= DevExpress.XtraTab.TabButtons.Close;
See Also