Unit MultiColour

Classes

TColourArrayPropertyEditor -
TColourListDlg -
TMultiColourControl -

Functions

Register - Public declarations

Types

Constants

max_colours

Variables


Functions


procedure Register;

Public declarations

Types


Constants

max_colours = 8

Revision history: V1.0.0 1997 May 18 First version Notes: This unit defines the TMultiColourControl component. The component itself has an array of TColor, and a count of the number of colours. As presently implemented, there is a fixed maximum number of colours (8), but this is defined by a constant. Properties: NumColours Integer read/write Number of colours Colours String read/write Comma separated list of integers (hex returned) OnColourChange TNotifyEvent read/write Called if colours changed The component will be redrawn if the NumColours or Colours properties are changed, but not if the ColourArray is directly modified. The component is implemented as a derivative of TGraphicControl since it is expected the component will be used to derive the PieChart, or other TGraphicControl components yet to be written. The property editor dialog has a private copy of the TMultiColourControl, and the editor's Edit method uses the GetStrValue and SetStrValue to convert between comma separated strings and an array of TColor. The Edit method displays a small dialog box with all the colours displayed as label backgrounds, and responds to double-clicks on each label by calling up a standard TColorDialog editor.

Variables