Skip to content

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

License

Notifications You must be signed in to change notification settings

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)