In the Memopad example, I noticed they had the following for scrolling up
and down:

// Scrolling up section
lastRow = TblGetLastUsableRow(table) - 1;

for(i = 0; i < linesToScroll; i++)
{
scrollAmount += TblGetRowHeight(table, lastRow);
TblRemoveRow(table, 0);
}

// Scrolling down section
for(i = 0; i < -linesToScroll; i++)
{
// Acquire incremented row height - should be 11 pixels each
scrollAmount += TblGetRowHeight(table, 0);
TblInsertRow(table, 0);
}


Now, I believe TblGetRowHeight(table) just returns the height of a table row
in pixels.  I know to have

scrollAmount += 11;  // knowing that my row height will always be 11

isn't a good idea.  However, as far as I can tell, there is no reason to
have the section:

lastRow = TblGetLastUsableRow(table) - 1;

in the code.  Am I right in assuming this?  Why don't they just get the row
height of Row 0 by default... or hardcode the 11?

--

Tim Astle



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to