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....



Colors


Unit:SDL_colsel
Class:TColSel
Declaration:property Colors [Index: integer]: TColor;

The array property Colors defines the color values 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.

By default, the following colors are defined after start-up:

clBlack, clMaroon, clGreen, clOlive, clNavy, clPurple, clTeal, clGray, clSilver, clRed, clLime, clYellow, clBlue, clFuchsia, clAqua, clWhite, clMoneyGreen, clSkyBlue, clCream, clMedGray, clActiveBorder, clActiveCaption, clAppWorkSpace, clBackground, clBtnFace, clBtnHighlight, clBtnShadow, clBtnText, clCaptionText, clDefault, clGrayText, clHighLight, clHighLightText, clInactiveBorder, clInactiveCaption, clInactiveCaptionText, clInfoBk, clInfoText, clMenu, clMenuText, clNone, clScrollBar, cl3DDkShadow, cl3DLight, clWindow, clWindowFrame, clWindowText

Hint 1: When setting a color value the corresponding name of the color is automatically set (property ColorNames). The string for the color value 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.

Example: This property is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): selcolor



Last Update: 2012-Oct-20