Vcl.Tabs.TTabSet.OnMeasureTab

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnMeasureTab: TMeasureTabEvent read FOnMeasureTab write FOnMeasureTab;

C++

__property TMeasureTabEvent OnMeasureTab = {read=FOnMeasureTab, write=FOnMeasureTab};

Properties

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

Description

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

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.

See Also