How to set the Close button for active tab or all the tab items in the WinForms TabControl?
In TabControlAdv, Close button appearance can be customized by using its property ShowTabCloseButton and ShowCloseButtonForActiveTabOnly.
ShowTabCloseButton - To show Close button for all TabPageAdv’s in TabControlAdv.
ShowCloseButtonForActiveTabOnly - To show Close button for active TabPageAdv in TabControlAdv.
The following code example is to demonstrate the same.
//Show Close button for all the tab item this.tabControlAdv1.ShowTabCloseButton = true; this.tabControlAdv1.ShowCloseButtonForActiveTabOnly = false; //Show Close button for Active tab item this.tabControlAdv1.ShowCloseButtonForActiveTabOnly = true; this.tabControlAdv1.ShowTabCloseButton = true;
'Show Close button for all the tab item Me.tabControlAdv1.ShowTabCloseButton = True Me.tabControlAdv1.ShowCloseButtonForActiveTabOnly = False 'Show Close button for Active tab item Me.tabControlAdv1.ShowCloseButtonForActiveTabOnly = True Me.tabControlAdv1.ShowTabCloseButton = True
For both the cases, set ShowTabCloseButton to true.
I hope you enjoyed learning about how to set the Close button for active tab or all the tab items in the WinForms TabControlAdv.
You can refer to our WinForms TabControl featuretour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WinForms TabControl demo to understand how to create and manipulate data.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!