Hi, Boris.
Set Usable in resource, and MinVal, MaxVal to 0;
Calling SclSetScrollBar() should be enough to make it shown.
Damir.
BE> I have a relatively simple table where all cell are custom drawn.
BE> Sometimes the number of records to display is minimal -- so no need
BE> for ScrollBar. Therefore, in resource editor, I set Usable for scroll
BE> bar to false. When my init procedure detects that there are more
BE> records that table can display at a time, I am trying to set scroll
BE> bar visible. However it never happens. There code I am using is:
if (numOfPrograms >> numRows)
BE> {
BE> ScrollBarType *verBar = (ScrollBarType *)
BE> FrmGetObjectPtr(form, FrmGetObjectIndex(form, sclSummary));
BE> TblHasScrollBar(table, true);
BE> CtlSetUsable(FrmGetObjectPtr(form, FrmGetObjectIndex(form, sclSummary)), true);
BE> SclSetScrollBar(verBar, 1, 0, numOfPrograms - numRows - 1, numRows - 1);
BE> SclDrawScrollBar(verBar);
BE> }
BE> else TblHasScrollBar(table, false);
BE> Basically the task is to show/hide(enable/disable) scroll bar at will.
BE> I would appreciate any ideas and comments.
BE> --
BE> Best regards,
BE> Boris mailto:[EMAIL PROTECTED]
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/