I have a relatively simple table where all cell are custom drawn.
Sometimes the number of records to display is minimal -- so no need
for ScrollBar. Therefore, in resource editor, I set Usable for scroll
bar to false. When my init procedure detects that there are more
records that table can display at a time, I am trying to set scroll
bar visible. However it never happens. There code I am using is:

if (numOfPrograms > numRows)
{
  ScrollBarType *verBar = (ScrollBarType *) FrmGetObjectPtr(form, 
FrmGetObjectIndex(form, sclSummary));
  TblHasScrollBar(table, true);
  CtlSetUsable(FrmGetObjectPtr(form, FrmGetObjectIndex(form, sclSummary)), true);
  SclSetScrollBar(verBar, 1, 0, numOfPrograms - numRows - 1,  numRows - 1);
  SclDrawScrollBar(verBar);
}
else    TblHasScrollBar(table, false);


Basically the task is to show/hide(enable/disable) scroll bar at will.
I would appreciate any ideas and comments.

-- 
Best regards,
 Boris                          mailto:[EMAIL PROTECTED]


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

Reply via email to