Show: Delphi C++
Display Preferences

Vcl.StdCtrls.TCustomListBox.DrawItem

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DrawItem(Index: Integer; Rect: TRect;  State: TOwnerDrawState); virtual;

C++

virtual void __fastcall DrawItem(int Index, const System::Types::TRect &Rect, Winapi::Windows::TOwnerDrawState State);

Properties

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

Description

Generates an OnDrawItem event.

DrawItem is called whenever a visual aspect of an owner-draw list box changes. The list box calls DrawItem for each visible item in its list, passing the index of the item in the Index parameter.

By default, the DrawItem method for a list box calls any event handler attached to the component's OnDrawItem event. If there is no handler attached, DrawItem fills the rectangle passed in Rect and draws any text associated with the indexed item. The default drawing ignores the State parameter, although State is passed along to attached event handlers.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance