Promotic

onStart - event of the PmgObject object

Description:
The event is triggered on the construction of the Pmg object in the course of opening the panel.
The event can be used, for example, to the initial initialization of the Pmg object or to the initial data transfer into the Pmg object.
Parameters:
pMe(Object) Reference to the PmgObject object where the event rises.
pEvent(Object) Reference to the object describing detailed information about the specific event.
The pEvent parameter is not used here because this event does not need any additional information.
Note:
This event is also functional in Web panels.

Caution:
In this event it is not possible so far to use methods (properties) that access the window content over the PmaPanel object, for example pMe.PmPanel.X, etc. Calling can be replaced, for example, by the calling the pMe.Items("/ItemName").
See also:
Example:
Calls the panel designer's method InitTable that returns an array of values. Those are then written into the table in the panel.
JavaScriptVBScriptSelect and copy to clipboard

var iRow, iCol;
var aValues = pMe.PmPanel.Methods.InitTable();
var oTable = pMe.Items("/Table");
var nRows = aValues.GetSize(1);
var nCols = aValues.GetSize(2);

oTable.Rows = nRows;
oTable.Cols = nCols;
for (iRow = 0; iRow < nRows; iRow++)
{
for (iCol = 0; iCol < nCols; iCol++)
{
oTable.SetCellText(iRow, iCol, aValues.GetItem(iRow, iCol));
}
}
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.