HeaderPane
Main

Compare

A Windows Forms TabControl with close buttons

The Windows Forms TabControl has looked the same for twenty years and has no close buttons, no tab reordering and no say over tab colors. Here is how it compares with SftTabs/NET 3.0.

The problem

The TabControl is fine for a settings dialog with three pages. It runs out quickly when an application uses tabs the way browsers and editors do: documents that open in tabs, tabs the user closes and rearranges, a tab that shows a status image or a progress bar, a look that matches the rest of the application.

The usual answer is owner-drawing: set DrawMode, paint every tab yourself, hit-test your own close glyph, and write the drag code for reordering. It works until the next DPI or theme change. SftTabs/NET 3.0 is a tab control for Windows Forms, written entirely in C#, that has these features built in.

Feature comparison

FeatureTabControlSftTabs/NET 3.0
LooksThe Windows theme, buttons or flat buttonsEight: Windows theme, classic 3D, flat, buttons, underline, document, rounded and pills
Close button on tabsNo, owner-drawYes, always or on the selected or hot tab
Tab reordering by the userNoYes, by dragging
Tab contentsText and one ImageList imageText, images, buttons, check boxes, radio buttons and progress bars, in any combination
Tab colorsNo, owner-drawFull color support, gradient fills, flyby highlighting
Hidden and disabled tabsNo, the tab page has to be removedYes
Many tabsMultiple rows or scroll buttonsMultiple rows with several row layouts, or one scrollable row
Close, Minimize and Restore buttonsNoYes
TooltipsFor tabsFor tabs and buttons
Tabs without pagesNoYes, use just the row of tabs

What the code looks like

If you know the TabControl, SftTabs/NET will look familiar: tabs have pages, and pages hold your controls. This adds a tab with a close button and removes it when the button is clicked:

sftTabs1.Look = TabLookEnum.Document;
sftTabs1.AllowReordering = true;

TabClass tab = sftTabs1.Tabs.Add("Report.pdf");
tab.CloseButton = TabCloseButtonOptionalEnum.Always;
tab.Page.Controls.Add(viewer);
tab.Select();

private void sftTabs1_TabCloseButtonClicked(object sender, TabEventArgs e) {
    e.Tab.Remove();
}

You can also skip the code: the control is placed from the Visual Studio toolbox, and its property pages let you design the tabs visually.

Modern Windows

SftTabs/NET 3.0 runs in .NET Framework 4.7 (or later) and .NET 10 (or later) applications, with the same API and Visual Studio designer support in both. Set one property and it follows the Windows light/dark setting. It scales with the DPI of the monitor showing it, honors the Windows contrast themes and has built-in UI Automation support for Narrator, NVDA, JAWS and other screen readers.

When the TabControl is enough

If a dialog has a few fixed pages and the standard look suits your application, the TabControl is fine, and it is free. SftTabs/NET earns its place when users open, close and rearrange tabs, when tabs carry more than a caption, or when the tabs should look like the rest of your application.

Try it

The free trial includes the working control and the C# and VB.NET samples. Test it in your own forms before you buy. A license is royalty-free and includes one year of support and upgrades.

SftTabs/NET 3.0 and free trial Documentation