Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WinForms Hiding TabControl Headers

I need some way to hide the headers of a TabControl (I'll be switching the selected tab programatically). How can I do this?

like image 524
Entity Avatar asked Jun 06 '11 17:06

Entity


1 Answers

Here is the simplest solution:

tabControl.ItemSize = new Size(0, 1);
tabControl.SizeMode = TabSizeMode.Fixed;

Although the height is being set to 1 pixel, the headers will actually disappear completely when you also use TabSizeMode.Fixed.

This has worked well for me.

like image 161
Igby Largeman Avatar answered Nov 16 '22 00:11

Igby Largeman