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").
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));
}
}
Dim iRow, iCol, aValues, oTable, nRows, nCols
aValues = pMe.PmPanel.Methods.InitTable()
Set oTable = pMe.Items("/Table")
nRows = aValues.GetSize(1)
nCols = aValues.GetSize(2)
oTable.Rows = nRows
oTable.Cols = nCols
For iRow = 0 To nRows - 1
For iCol = 0 To nCols - 1
oTable.SetCellText iRow, iCol, aValues(iRow, iCol)
Next
Next