Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a Tab Control with no Tab Header in Windows form?

Tags:

c#

.net

winforms

I have created a Windows form using a Tab Control, but it has a header with it. I want to hide it. I am not able to do it using any properties of the Tab Control. Is there any property defined for hiding the tab header for the Tab Control without going through the code?

like image 589
Running Rabbit Avatar asked Apr 25 '12 13:04

Running Rabbit


People also ask

How do I create a tab control in Windows form?

Adding a TabControl to Form I create a Windows Form application using Visual Studio . NET and add a TabControl from Toolbox to the Form by dragging the TabControl to the Form. After that I resize and reposition TabControl according to the Form size. The Form Designer adds the code for TabControl for you.

How do I hide tabs on tab control?

To hide a tab: tabControl. TabPages. Remove(tabPage);

How do I add a tab control in Visual Studio?

PROPERTIES OF TAB CONTROLRight-click on the tab control and select properties. You can see the tab page called "Collection Editor". To add an additional tab, please click the add button. To remove a tab, select it and click remove.


1 Answers

Use following code to hide the tabs or set these properties in design.

    tabControl.Appearance = TabAppearance.FlatButtons;     tabControl.ItemSize = new Size(0, 1);     tabControl.SizeMode = TabSizeMode.Fixed; 
like image 196
Romil Kumar Jain Avatar answered Oct 16 '22 22:10

Romil Kumar Jain