API:Vcl.ExtCtrls.TCustomColorBox.DrawItem
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 | TCustomColorBox |
Description
Generates an OnDrawItem event.
Vcl.ExtCtrls.TCustomColorBox.DrawItem inherits from Vcl.StdCtrls.TCustomComboBox.DrawItem. All content below this line refers to Vcl.StdCtrls.TCustomComboBox.DrawItem.
Generates an OnDrawItem event.
When Style is csOwnerDrawFixed or csOwnerDrawVariable, DrawItem is called whenever an item in the list needs to be drawn. If an OnDrawItem event handler is assigned, DrawItem generates an OnDrawItem event, passing the Index, Rect, and State parameters to the event handler. Otherwise, OnDrawItem fills the rectangle passed in Rect and draws any text associated with the indexed item, ignoring the State parameter.
Override DrawItem to provide class-specific drawing code for the items in the list.