getColorKeys Method

Summary

Retrieves a list of color keys that are available in the current LEADIVEW version.

Syntax
TypeScript
JavaScript
getColorKeys = function() 
static getColorKeys(): string[]; 

Return Value

Returns an array of strings corresponding to color key values.

Remarks

As mentioned in the run method, when LEADVIEW first starts up it will look for a LEADVIEW.json file in the project. This JSON file allows support for altering the color scheme of LEADVIEW. This is done by adding an entry indexed by theme. The valid key values for the theme object will be the results of the getColorKeys method. Invalid key entries will be ignored.

The theming process for LEADVIEW works as follows:

  1. LEADVIEW checks for the existence of LEADVIEW.json file. If this file exists, it then checks if there is a theme key on the object.
  2. LEADVIEW applies the base theme. This will be either the Dark or Light theme, depending on user settings.
  3. LEADVIEW then applies any valid color keys that were found in the theme settings key over the default theme.

This makes it easy to extend the base LEADVIEW themes without having to modify multiple entries in a CSS file. For instance, a valid LEADVIEW.json file to change the font color of every object to green in LEADVIEW would look like this:

{ 
    "startupSettings" : "", 
    "theme" : { 
       "fontColor" : "green" 
    } 
} 

Requirements
Target Platforms
Help Version 21.0.2021.6.30
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.LEADVIEW Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.