Donna,
Try this attribute:
SetCtrlAttribute (panel, table, ATTR_NUM_VISIBLE_ROWS, 5);
It will size the table vertically to exactly fit the first 5 rows of the table, regardless of the height of each row. If the table has fewer than 5 rows, it will leave enough space for the remaining rows, based on how tall it "thinks" those additional rows will be.
If you ever change the height of one of the first 5 rows, you'll have to set this attribute again.
Also, if you're loading your table from the UI editor, you can configure this in the UI editor as well (from the Edit Table dialog, click on Size/Scroll Options, the check the Auto Size check box, and set the number of rows to 5).
Luis
NI