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 | Name of the control | |
selector | CSS selector within the control | |
property | Name of the CSS property | |
value | 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 |
Available from 1.8 |
Sample - JavaScript
TcHmi.StyleProvider.processGenericStyle(
'DataGrid1',
'td[data-row="' + 5 + '"][data-column="' + 2 + '"]',
'background-color',
'red'
);