RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TTabSet.OnDrawTab Event

Occurs when a tab in an owner-drawn tab set control needs to redisplay.

Pascal
property OnDrawTab: TDrawTabEvent;
C++
__property TDrawTabEvent OnDrawTab;

OnDrawTab occurs when a tab redisplays if the Style property value is tsOwnerDraw. For example, it happens when the user selects a tab or scrolls the tabs. 

You must write the code in the OnDrawTab event handler to draw the tab. 

OnDrawTab occurs just after the OnMeasureTab event, which contains the code to calculate the width of the tab needed. The height of the tab is determined by the value of the TabHeight property of the tab set control. The code you write in the OnDrawTab event handler, therefore, must use the width determined with the OnMeasureTab event to draw the tab. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!