[Overview][Types][Classes][Procedures and functions][Index] | Reference for unit 'ColorBox' (#lcl)

# TCustomColorBox

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TCustomColorBox - base class for TColorBox

## Declaration

Source position: colorbox.pas line 47

`type TCustomColorBox = class(TCustomComboBox)`
`protected`
`procedure DrawItem(); override;` |  | DrawItem - perform the action necessary to draw the specified indexed item at the specified position
`procedure SetColorList;` |  | SetColorList - specifies the list of colours to be presented in the drop-down
`procedure Loaded; override;`
`procedure InitializeWnd; override;` |  | InitializeWnd - initialise the window for this control
`procedure DoGetColors; virtual;` |  | DoGetColors - perform the code for getting colours
`procedure Change; override;` |  | Change - software emulation of OnChange event
`function PickCustomColor; virtual;` |  | PickCustomColor - if True, a custom colour is picked rather than one of the standard list
`public`
`constructor Create(); override;` |  | Create - constructor for TCustomColorBox: calls inherited Create, sets style, default colours and colour list, ReadOnly and Selected properties
`property Style: TColorBoxStyle; [rw]` |  | Style : may be Simple, a single-line Drop-Down or a Drop-Down list, or some version drawn by the Owner
`property Colors: TColor; [r]` |  | Colors the colour specified by the Index
`property ColorNames: String; [r]` |  | ColorNames - the name of the specified (indexed) colour, stored as a string
`property Selected: TColor; [rw]` |  | The colour that has been Selected from the ComboBox
`property DefaultColorColor: TColor; [rw]` |  | DefaultColorColor - the default colour, expressed as a Color value
`property NoneColorColor: TColor; [rw]` |  | NoneColorColor - the colour to be used when no selection has been made, or when None is selected, stored as a TColor
`property OnGetColors: TGetColorsEvent; [rw]` |  | OnGetColors - event handler for the instruction to Get Colours
`end;`

## Inheritance

`TCustomColorBox` |  | TCustomColorBox - base class for TColorBox
`TCustomComboBox` |  | TCustomComboBox - the base class from which TComboBox is derived
`TWinControl`
`TControl`
`TLCLComponent` |  | TLCLComponent - base class for LCL components
`TComponent,IUnknown,IInterfaceComponentReference`
`TPersistent`
`TObject`

The latest version of this document can be found at lazarus-ccr.sourceforge.net .