processGenericStyle

[ Function ]

public static processGenericStyle(
    controlName: string,
    selector: string,
    property: string,
    value: string | null | undefined
): void;

Sets a CSS property 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

property

string

Name of the CSS property

value

string, null, undefined

Desired new value of the CSS property. The value null (not the string "null") or undefined 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'
);