Articles in this section
Category / Section

How to set the Close button for active tab or all the tab items in the WinForms TabControl?

1 min read

CloseButton settings

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.


Reference link:


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.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

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 forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied