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.

C#

//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;

VB

'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

 

Note:

For both the cases, set ShowTabCloseButton to true.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/TabControlAdv2141775942.zip

Reference link:https://help.syncfusion.com/windowsforms/tabcontrol/interactive-features


Conclusion

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?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied