Each tab owns a page, a TabPageClass control, which hosts the controls displayed while the tab is selected. The page of the selected tab fills the client area of the control; the pages of all other tabs are hidden.
Tab pages are the only controls a SftTabs/NET control contains. They are found in the control's Controls collection, and tabs and pages are paired by position: the page at index n of the Controls collection belongs to the tab at index n of the SftTabs.Tabs collection. The TabClass.Page property returns the page of a tab and the TabPageClass.Tab property returns the tab of a page.
The control creates the page when a tab is added and disposes the page, with the controls it hosts, when the tab is removed. When a tab is moved to another position, its page moves with it. A page can also be added to the Controls collection directly; if there is no tab at its position, a tab with the page's text is added.
The control positions and sizes its pages. The SftTabs.DisplayRectangle property returns the area a page occupies, inside the page border and the control's Padding.
In Visual Studio, controls are placed on the page of the selected tab by dragging them from the Toolbox, like on any other container control. Once the tab control is selected in the designer, clicking a tab selects the tab and shows its page.
A page is painted by the control's look (see Tab Looks), using the color defined by the TabClass.PageBackColor property of its tab or, if that is not defined, the control's SftTabs.PageBackColor property. Controls on a page inherit this background, so labels, check boxes and similar controls blend in with the page. A page's own TabPageClass.BackColor property can be set to paint the page in a specific color.
With the SftTabs.ClientArea property set to False, the control has no client area and no pages: it is just the row of tabs. The application shows its own contents when the Switched event occurs.
The SftTabs.NaturalSize property returns the height (or the width, for tabs on the left or right) the row of tabs needs, and the SftTabs.MakeNaturalSize method sizes the control accordingly. The client area cannot be removed while a page hosts controls.
See Also Tab Control Components