HOME, PRODUCTS, ARTICLESCONTACT

BUY UPC™UPC™ FEEDBACKUPC™ SUPPORT

D.02. TADVANCE_ColorScheme

TPersistent

TADVANCE_ColorScheme

Expanded node of the ColorScheme in the Delphi™/C++ Object Inspector™.

Expanded node of the ColorScheme property in the Object Inspector™.

ColorSchemes streamline the application of color across modules and page populations, and can synchronize color behavior in separate toolbar, related controls, and status modules.

  • ColorScheme "variegation" automatically responds to run time alteration of the system color, clBtnFace.
  • Pages are excluded from ColorScheme processes by setting Page.ParentColor to False, or assigning different color values.
  • Default behavior reads the system clBtnFace color and moderately decrements this to determine the Alternate (Alt) base ColorScheme value.

    This means that Schemes will usually produce desirable results for user (consumer system) presets, and that, unless you want to deviate from this pattern, it will not be necessary to configure color other than by selecting an intended Scheme or allowing your users to select intended Schemes.

  • Schemes indicate a pattern for applying color:
    • clBtnFace schemes propagate the clBtnFace system color to all regions except the LogoPanel™.
    • Alt schemes propagate the default Alt color pair or alternate developer-defined Alt colors.
    • Variegated (Var) subschemes of each main scheme apply progressively lighter colors to composite paging regions above, and progressively darker colors to composite paging regions below the main paging region.
      • A Contrast property (1..14, default=5) determines the color stepping differential.

        As you can see from the images below, usual variegated schemes produce subtle gradient effects. The example images have Contrast set to 7.

      • FocusControls™ are offset -1 Contrast value from the related paged region.

CLBTNFACE COLOR SCHEMES

acsBtnFace (default)

acsBtnFaceVar

ALTERNATE COLOR SCHEMES

acsAltBaseColor

acsAltBaseColorVar

PROPERTIES

property AltBaseModuleColor : TColor read FAltBaseModuleColor write SetAltBaseModuleColor;
__property Graphics::TColor AltBaseModuleColor = {read=FAltBaseModuleColor, write=SetAltBaseModuleColor, nodefault};

AltBaseModuleColor is applied to the root module PageParent, Pages, and FocusControl™ when Scheme equals acsAltColor or acsAltColorVar.

property AltBaseModuleFontColor : TColor read FAltBaseModuleFontColor write SetAltBaseModuleFontColor;
__property Graphics::TColor AltBaseModuleFontColor = {read=FAltBaseModuleFontColor, write=SetAltBaseModuleFontColor, nodefault};

AltBaseModuleFontColor is applied to the root module PageParent, Pages, and FocusControl™ fonts when Scheme equals acsAltColor or acsAltColorVar.

property AltEmbeddedModuleColor : TColor read FAltEmbeddedModuleColor write SetAltEmbeddedModuleColor;
__property Graphics::TColor AltEmbeddedModuleColor = {read=FAltEmbeddedModuleColor, write=SetAltEmbeddedModuleColor, nodefault};

AltEmbeddedModuleColor is applied to embedded module PageParents, Pages, and FocusControls™ when Scheme equals acsAltColor or acsAltColorVar.

property AltEmbeddedModuleFontColor : TColor read FAltEmbeddedModuleFontColor write SetAltEmbeddedModuleFontColor;
__property Graphics::TColor AltEmbeddedModuleFontColor = {read=FAltEmbeddedModuleFontColor, write=SetAltEmbeddedModuleFontColor, nodefault};

AltEmbeddedModuleFontColor is applied to embedded module PageParents, Pages, and FocusControl™ fonts when Scheme equals acsAltColor or acsAltColorVar.

property BtnFaceScheme_FocusControlFontColor : TColor read FBtnFaceScheme_FocusControlFontColor write SetBtnFaceScheme_FocusControlFontColor;
__property Graphics::TColor BtnFaceScheme_FocusControlFontColor = {read=FBtnFaceScheme_FocusControlFontColor, write=SetBtnFaceScheme_FocusControlFontColor, nodefault};

BtnFaceScheme_FocusControlFontColor is applied to FocusControl™ fonts when Scheme equals acsBtnFace or acsBtnFaceVar.

property BtnFaceScheme_PageFontColor : TColor read FBtnFaceScheme_PageFontColor write SetBtnFaceScheme_PageFontColor;
__property Graphics::TColor BtnFaceScheme_PageFontColor = {read=FBtnFaceScheme_PageFontColor, write=SetBtnFaceScheme_PageFontColor, nodefault};

BtnFaceScheme_PageFontColor is applied to PageParent and Page fonts when Scheme equals acsBtnFace or acsBtnFaceVar.

DELPHI EXAMPLE — SETTING COLORS WITH A COLOR DIALOG

Copy code to clipboard (JavaScript/IE).

C++ EXAMPLE

Copy code to clipboard (JavaScript/IE).

property Scheme : TADVANCE_ColorSchemeVal read FScheme write SetScheme default acsBtnFace;
__property TADVANCE_ColorSchemeVal Scheme = {read=FScheme, write=SetScheme, default=0};

TADVANCE_ColorSchemeVal = (acsBtnFace, acsBtnFaceVar, acsAltColor, acsAltColorVar);
enum TADVANCE_ColorSchemeVal { acsBtnFace, acsBtnFaceVar, acsAltColor, acsAltColorVar };

The value of Scheme controls application of both the clBtnFace or Alt base color to the module, as well as the Variegated subscheme option. BtnFace schemes automatically respond to run time changes applied to the system color. To exclude fonts, pages or subcomponents from the scheme, set Color to a different value (which also sets ParentColor to false) or set ParentColor to false.

DELPHI EXAMPLE — SETTING THE SCHEME FROM A COMBO BOX

Copy code to clipboard (JavaScript/IE).

C++ EXAMPLE — SETTING THE SCHEME FROM A COMBO BOX

Copy code to clipboard (JavaScript/IE).

property VarSubcomponentContrast : Integer read FVarSubcomponentContrast write SetVarSubcomponentContrast default 5;
__property int VarSubcomponentContrast = {read=FVarSubcomponentContrast, write=SetVarSubcomponentContrast, default=5};

VarSubcomponentContrast prescribes the contrast differential applied to adjacent modules and FocusControls™ when Scheme = acsBtnFaceVar or acsAltColorVar. The maximum value is 14 and the minimum is 1.

DELPHI EXAMPLE — SETTING CONTRAST FROM A COMBO BOX

Copy code to clipboard (JavaScript/IE).

C++ EXAMPLE — SETTING CONTRAST FROM A COMBO BOX

Copy code to clipboard (JavaScript/IE).

© Copyright 1995-2007, by ADVANCE Information Systems, Inc. ALL RIGHTS RESERVED.Copyright 1995-2007, by ADVANCE Information Systems, Inc. ALL RIGHTS RESERVED.

Firefox™.Best viewed in Mozilla Firefox™.