Hi wolf,
use the SetCtrlAttribute function with the ATTR_FIRST_VISIBLE_ROW attribute to scroll down through the table. Since you would like to have your active row in the middle of the table, you should substract half of the visible number of rows from this row number. Take a look at the following example:
int num_visible_rows, first_visible_row;
// Get the number of visible rows of your table.
GetCtrlAttribute (pnlHandle, PNL_TABLE, ATTR_NUM_VISIBLE_ROWS, &num_visible_rows);
// Now calculate the first row of your table that should be visible.
first_visible_row = active_row - num_visible_rows/2;
if (first_visible_row < 1) first_visible_row = 1;
// Scroll the table.
SetCtrlAttribute (pnlHandle, PNL_TABLE, ATTR_FIRST_VISIBLE_ROW, first_visible_row);
Message Edited by Wim S on 10-31-2006 02:49 PM