RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TTabSet.OnMeasureTab Event

Occurs when an application needs to redisplay a tab in an owner-draw tab set.

Pascal
property OnMeasureTab: TMeasureTabEvent;
C++
__property TMeasureTabEvent OnMeasureTab;

OnMeasureTab occurs only if the Style property is tsOwnerDraw. In the OnMeasureTab event handler, write the code to calculate the width needed to draw the tab. Your code is responsible for calculating and returning the tab width, depending on what you have drawn in the tab (if the tab is of Style tsOwnerDraw). After the OnMeasureTab event occurs, the OnDrawTab event occurs, when the OnDrawTab event handler draws the tab using the width calculated in OnMeasureTab. 

 

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