Let's have the PmgWTable object in the oTable variable placed in the graphics editor.
var i, nRows;
var oTable = pMe;
if (nRows > 20)
{
for (i = 21; i < nRows; i++)
oTable.RemoveRow(-1);
}
else
{
if (nRows < 20)
{
for (i = nRows; i < 19; i++)
oTable.InsertRow(-1);
}
}
oTable.RowFirstVisible = oTable.FixedRows;
oTable.ColFirstVisible = oTable.FixedCols;