[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Draws an item in the combo-box control.
Source position: colorbox.pas line 70
protected procedure TCustomColorBox.DrawItem( |
Index: Integer; |
Rect: TRect; |
State: TOwnerDrawState |
); override; |
Index |
|
Ordinal position for the item drawn in the method. |
Rect |
|
Rectangle with the bounds for the item. |
State |
|
Owner draw state for the item. |
DrawItem is an overridden method used to custom draw an item in the ColorBox.
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.
|
Draws a list item, using the OnDrawItem handler (when assigned). |
Version 4.0 | Generated 2025-05-03 | Home |