Vcl.Tabs.TTabSet.Style

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Style: TTabStyle read FStyle write SetTabStyle default tsStandard;

C++

__property TTabSetTabStyle Style = {read=FStyle, write=SetTabStyle, default=0};

Properties

Type Visibility Source Unit Parent
property published
Vcl.Tabs.pas
Vcl.Tabs.hpp
Vcl.Tabs TTabSet

Description

Determines whether the tab set is owner-drawn.

Owner-draw tabs can display objects other than strings, such as graphical images. Owner-draw tabs require more programming, however, because the application needs information on how to render the image for each tab in the tab set control.

Each time an item is displayed in an owner-drawn tab, two events occur. The first is the OnMeasureTab event. In the OnMeasureTab event handler, you write the code that calculates the width of the tab needed to hold the text or graphical image. After the OnMeasureTab event, the OnDrawTab event occurs. The code you write for the OnDrawTab event draws the tab and its contents using the width found with the OnMeasureTab event and the height specified as the value of the TabHeight property.

Note: The TTabStyle type defined in the tabs unit for the Style property differs from the TTabStyle type defined in the comctrls unit. Do not use or include the comctrls unit in source files where you are working with the tab control. Doing so can lead to compiler errors because of type mismatches.

See Also