Skip to main content
A newer version of this page is available. .

XtraTabControl.HeaderButtonClick Event

Occurs when a built-in header button is clicked.

Namespace: DevExpress.XtraTab

Assembly: DevExpress.XtraEditors.v19.1.dll


public event HeaderButtonEventHandler HeaderButtonClick

Event Data

The HeaderButtonClick event's data class is HeaderButtonEventArgs. The following properties provide information specific to this event:

Property Description
ActivePage Gets an active tab page within the tab control.
Button Gets the currently processed header button.
Handled Gets or sets whether the XtraTabControl.HeaderButtonClick event has been handled, and no default processing is required.


The tab control has the built-in Next, Prev and Close header buttons (see the XtraTabControl.HeaderButtons topic). The Next and Prev buttons have default processed actions (switching an active tab to next or previous). By default, the Close button has no default action. To implement a default action for the Close button, use the XtraTabControl.CloseButtonClick event.

You can override default actions for the built-in header buttons by handling the HeaderButtonClick event. When handling the HeaderButtonClick event, you need to set the HeaderButtonEventArgs.Handled property to true, to prevent a button’s default action from being invoked after your event handler call.

You can also add custom header buttons to a tab control via the XtraTabControl.CustomHeaderButtons property.

See Also