RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TTabSet.Style Property

Determines whether the tab set is owner-drawn.

Pascal
property Style: TTabStyle;
C++
__property TTabStyle Style;

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 to 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.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!