/winforms-tab-control-display-header-buttons

Create a custom tab control that can display buttons in tab headers.

Primary LanguageVisual Basic .NETOtherNOASSERTION

WinForms Tab Control - Display custom buttons in tab headers

This example creates a custom tab control that can display buttons in tab headers.

WinForms Tab Control - Display custom buttons in tab headers

Use the XtraTabPageDescendant.CustomButtons property to access tab header buttons:

xtraTabPageDescendant1.CustomButtons.Add(new CustomHeaderButton() { Kind = ButtonPredefines.Plus });

The XtraTabPageDescendant.CustomPageButtonClick event allows you to handle button clicks:

private void xtraTabControlDescendant1_CustomHeaderButtonClick(object sender, CustomHeaderButtonEventArgs e) {
    XtraTabControlDescendant xtraTab = sender as XtraTabControlDescendant;
    MessageBox.Show(string.Format("TabName {0}, click on button {1} kind {2}", xtraTab.Name, e.Button.Index, e.Button.Kind));
}

Files to Review

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)