getDefaultValue
[ Function ]
public static getDefaultValue (
control: TcHmi.Controls.System.baseTcHmiControl,
propertyName: string
): TcHmi.Theme.Resource;
Returns the current default value (determined by the theme) of a control property.
Parameter
Name | Type | Description |
---|---|---|
control |
| |
propertyName |
|
Return value
Type | Description |
---|---|
Currently active default value. |
Available from version 1.10 |
Sample - JavaScript
var themeValue = TcHmi.Theme.Properties.getDefaultValue(this, 'Value');
if(themeValue.origin === 'project'){
// Value was set in a project theme
}
if(themeValue.value !== null){
// use themeValue.value
// Is for example false if this was set in the Theme or defaultValueInternal of its Description.json
}