[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Draws the color preview and name for an item in list box control.
Source position: colorbox.pas line 195
protected procedure TCustomColorListBox.DrawItem( |
Index: Integer; |
Rect: TRect; |
State: TOwnerDrawState |
); override; |
DrawItem is an overridden method used to custom draw an item in the control.
A color preview is drawn using the value in Colors. For clNone and clDefault, the value in NoneColorColor and DefaultColorColor are used to draw the color preview. The value in State is updated to include odBackgroundPainted in the state flags.
The item rectangle is made smaller and passed to the inherited method to draw the text for the item.
The Brush color and Pen color for the control Canvas are reset to their original values after drawing the item.
|
Paints an item in owner-draw mode. |
Version 4.0 | Generated 2025-05-03 | Home |