RAD Studio VCL Reference
TCheckListBox.DrawItem Method

Generates an OnDrawItem event.

procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override;
virtual __fastcall DrawItem(int Index, TRect Rect, TOwnerDrawState State);

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. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!