WinForms Hiding TabControl Headers

Entity picture Entity · Jun 6, 2011 · Viewed 12.1k times · Source

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

Answer

Igby Largeman picture Igby Largeman · Jul 21, 2011

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.