Table of Contents

ExTabControl

ExTabControl is a TabControl that draws the tab headers and the border in its own colors for the normal, active and highlighted tabs, and can cancel the change of the selected tab.

Custom style

Property Description
DefaultStyle true (default) leaves the drawing to Windows, false uses the custom style.
HeaderBackColor, HeaderForeColor Headers of inactive tabs.
ActiveHeaderBackColor, ActiveHeaderForeColor Header of the selected tab.
HighlightBackColor, HighlightForeColor Header under the mouse.
BorderColor, BorderThickness Border of the tab pages.

Changing the tab

SelectedIndexChanging occurs before another tab is selected. Its TabPageChangeEventArgs can cancel the change, for example while the current page has invalid input.

Theme

The tab control applies the theme to its pages and their controls first.

Theme color Used for
PanelBackColor, PanelForeColor Pages and the header of the selected tab.
BoxBackColor, BoxForeColor Headers of inactive tabs.
ButtonBackColor, ButtonForeColor Header under the mouse.
BorderColor Border.

API