setThemeValue
[ Function ]
public static setThemeValue (
control: TcHmi.Controls.System.baseTcHmiControl,
propertyName: string
): TcHmi.Errors;
Sets the current default value of the theme for a control property.
At the same time, this control property is changed when the theme is changed. The value therefore remains set to the theme value.
Parameter
Name | Type | Description |
---|---|---|
control |
| |
propertyName |
|
Return value
Type | Description |
---|---|
Success or failure as a number. |
Available from version 1.10 |
Sample - JavaScript
var result = TcHmi.Theme.Properties.setThemeValue(this, 'Value');
if(result === TcHmi.Errors.NONE){
// valid value
}
var result2 = TcHmi.Theme.Properties.setThemeValue(this, 'RenderedLeft');
if(result2 === TcHmi.Errors.NONE){
//
}else{
// RenderedLeft is readonly!
}