The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Declaration:property ColorNames [Index: integer]: string;

The array property ColorNames defines the names of the colors shown in the control. The parameter Index determines which color field is to be set or read; it may take any value between 1 and NumColors.

Hint 1: The name of the color is automatically set when the corresponding Colors property element is set. So you may have to adjust the name of the color after changing a particular color value. The name string is obtained from the function ColorToString of the unit Graphics(VCL), or qGraphics(CLX)

Hint 2: The colors are indexed from 1 to NumColors and not from 0 to NumColors-1. Thus you have to add 1 when accessing a color by the property ItemIndex of the combo box.

Hint 3: In the Light Edition the property ColorNames is read-only.

Example: This property is used in the following example program (see for downloading the code): selcolor

Last Update: 2012-Okt-20