processGenericStyle

[ Function ]

public static processGenericStyle(
    controlName: string,
    selector: string,
    styles: Dictionary<string | string[] | null | undefined> | null
): void;

Sets multiple CSS properties for one or more HTML elements within a control.

This API is slower than the setSimpleStyle function, but it can reach dynamically changing child elements.

Parameter

Name

Type

Description

controlName

string

Name of the control

selector

string

CSS selector within the control

styles

Dictionary<string, string[], null, undefined>, null

Desired new values of the CSS property in an object. The value null (not the string "null") deletes the current value.

Return value

Type

Description

void

No return value

processGenericStyle 1:

Available from 1.8

Sample - JavaScript

TcHmi.StyleProvider.processGenericStyle(
    'DataGrid1',
    'td[data-row="' + 5 + '"][data-column="' + 2 + '"]',
    {
        'background-color': 'red'
    }
);