Vcl.Tabs.TTabSet.OnDrawTab

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnDrawTab: TDrawTabEvent read FOnDrawTab write FOnDrawTab;

C++

__property TTabSetDrawTabEvent OnDrawTab = {read=FOnDrawTab, write=FOnDrawTab};

Properties

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

Description

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

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.

OnDrawTab is an event handler of type Vcl.Tabs.TDrawTabEvent.

See Also