getControlBasePathEx
[ Function ]
public static getControlBasePath(
control: TcHmi.Controls.System.baseTcHmiControl
): string | null;
Returns the base path of a control based on an instance of TcHmi.Controls.System.baseTcHmiControl. This is required, for example, if you want to access the directory of a control.
Parameter
Name | Type | Description |
---|---|---|
control | Reference to an instance of TcHmi.Controls.System.baseTcHmiControl. |
Return value
Type | Description |
---|---|
Base path of the control or null if the type is unknown. |
Available from version 1.12 |
Sample - JavaScript
var fullImagePath = TcHmi.Environment.getControlBasePathEx(this) + '/images/myImg.png';