Vcl.ExtCtrls.TCustomColorListBox.DrawItem

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

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.ExtCtrls.pas
Vcl.ExtCtrls.hpp
Vcl.ExtCtrls TCustomColorListBox

Description

Generates an OnDrawItem event.

Vcl.ExtCtrls.TCustomColorListBox.DrawItem inherits from Vcl.StdCtrls.TCustomListBox.DrawItem. All content below this line refers to Vcl.StdCtrls.TCustomListBox.DrawItem.

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