Defines Classes for selecting colour from a list or ComboBox
TColorPalette
- enumerated type: whether default or full palette is to be used
TColorBox
- presents the user with a ComboBox with a drop-down list from which to select a colour
Read specifier for selection property
Use GetSelection to convert the item selected into a system color.
Write specifier for selection property
Use SetSelection to set the item in the ColorBox when appointed a color from code.
Write specifier for the Palette property
Use SetPalette to determine wether to reset the colorlist in the ColorBox based on the type of palette.
Use SetStyle to prevent the style to be changed to anything else than csOwnerDrawFixed.
Use DrawItem to customdraw an item in the ColorBox. A color preview is drawn and the item rectangle is made smaller and given to the inherited method to draw the corresponding text. The Brush color and Pen color where changed and reset to their original values.
Use Create to create an instance of TColorBox and initialize all properties and variables.
Write specifier for the ColorList property
Use SetColorList to fill the itemlist in the ColorBox with the right color entries. Based on the value of the Palette property.
The Palette of colours to be used for the drop-down list
Colors
- the indexed colour values available for the list
Color
- this is the colour for the display of the actual control, not the colour selected from the list
TColorListBox
- a box containing a simple list of colours from which to select
SetColorList
- stores the list of colours
Colors
- the indexed colour values available for the list
The colour that has been Selected from the list
Color
- Determine the colour for the display of the actual control, not the colour selected from the list
The Palette of colours from which selection is to be made
Register procedure for colorbox
This procedure registers the component to the Addtional menu
TCustomColorBox
- base class for TColorBox
Create
- constructor for TCustomColorBox: calls inherited Create, sets style, default colours and colour list, ReadOnly and Selected properties
TCustomCombobox.Create
SetColorList
- specifies the list of colours to be presented in the drop-down
Colors
the colour specified by the Index
The Palette of colours to be included
The colour that has been Selected from the ComboBox
TCustomColorListBox
- base class for TColorListBox
SetStyle
- specify the Style
Create
- constructor for TCustomColorListBox: calls inherited Create, initialises style, default colours and sets colour list
TCustomListBox.Create
SetColorList
- specifies the list of colours
The Colors specified by Index
The Palette to be used to supply the colours
TColorBoxStyle
- set of TColorBoxStyles
DoGetColors
- perform the code for getting colours
PickCustomColor
- if True, a custom colour is picked rather than one of the standard list
ColorNames
- the name of the specified (indexed) colour, stored as a string
DefaultColorColor
- the default colour, expressed as a Color value

DefaultColorColor - the default colour, expressed as a Color value

The use of the construct ..ColorColor denotes the value of a colour as a TColor, as opposed to an index value

NoneColorColor
- the colour to be used when no selection has been made, or when None is selected, stored as a TColor
OnGetColors
- event handler for the instruction to Get Colours
DoGetColors
- perform the code for getting the colours
PickCustomColor
- if True, a custom colour is picked rather than one from the standard list
ColorNames
- the name of the indexed colour, stored as a string
DefaultColorColor
- the default colour, expressed as a Color value

DefaultColorColor - the default colour, expressed as a Color value

The use of the construct ..ColorColor denotes the value of a colour as a TColor, as opposed to an index value

NoneColorColor
- the colour to be used when no selection has been made, or when None is selected, stored as a TColor
OnGetColors
- event handler for the instruction to Get Colours