Vcl.StdCtrls.TCustomListBox.OnMeasureItem

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnMeasureItem: TMeasureItemEvent read FOnMeasureItem write FOnMeasureItem;

C++

__property TMeasureItemEvent OnMeasureItem = {read=FOnMeasureItem, write=FOnMeasureItem};

Properties

Type Visibility Source Unit Parent
event protected
Vcl.StdCtrls.pas
Vcl.StdCtrls.hpp
Vcl.StdCtrls TCustomListBox

Description

Occurs when the application needs to redisplay an item in a variable height owner-draw list box.

Use OnMeasureItem to write a handler to measure items to be drawn in a list box with a Style property value of lbOwnerDrawVariable.

OnMeasureItem is of type Vcl.StdCtrls.TMeasureItemEvent which contains three parameters describing the item to measure.

After the OnMeasureItem event occurs, the OnDrawItem event occurs, rendering the item with the measured size.

See Also

Code Examples