setSimpleElementStyle
[ Function ]
public static setSimpleElementStyle(
element: Jquery<Element> | readonly Element[] | NodeListOf<Element> | HTMLCollectionOf<Element> | Element | undefined,
styles: Dictionary<string | string[] | null> | null
): void;
Sets multiple CSS properties for one or more HTML or SVG elements.
Parameter
Name | Type | Description |
---|---|---|
element Info: Type Element supported from version 1.10 | JQuery<Element>, readonly Element[], NodeListOf<Element>, HTMLCollectionOf<Element>, Element, undefined |
|
styles | Dictionary<string, string[], null>, 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 |
Available from 1.8 |
Sample - JavaScript
var control = TcHmi.Controls.get('TcHmiButton');
if(control === undefined){
return;
}
var cntrlElem = control.getElement();
TcHmi.StyleProvider.setSimpleElementStyle(cntrlElem,
{
'height': '42px',
'width': '140px'
}
);