Thanks Greg. That's pretty much what I had to do with the scrollbar when I was trying to scroll a field. It's ashame that there aren't some more straightforward API calls to handle this silly functionality. If there is anyone on the board that has a hand in the API (i.e. Ben), why do some of the UI controls not have more robust functionality in the API like pretty much all of the Win controls? Just curious if it is some sort of space issue. Windows tends to set aside the necessary room to hold info in it's editable and static fields. It also manages the contents of list views, trees, and other nice UI components. Shouldn't all of this implementation be transparent to the programmer? I'm sure there are quite a few programmers out there that have written some sort of wrapper or "interface" for these functions. Just a thought -- not to be viewed as a rant.
Regards, Daniel Suleski :-> TD, Mysticware Inc. www.mysticware.com "Greg Lutz" <[EMAIL PROTECTED]> wrote in message news:114000@palm-dev-forum... > > At 08:10 PM 2/17/2003 -0500, Dan wrote: > > >Does anyone out there know of a good example I can look at on how to link up > >a scrollbar and a table? I've done this with a field and a scrollbar, but > >never a table. I notice that there is a function in the API that allows me > >to get the current top row, but I see nothing that let's me set the top row. > > Palm OS doesn't manage the connection between the table and the scroll > bar. Your program has to "listen" for activity on the scroll bar and > redraw the table accordingly (typically by responding to scroll bar > events). And if scrolling of the table is triggered by some other source > (such as the scroll-up and scroll-down hardware buttons), you have to > "tell" the scroll bar so it can redraw itself. The only method available > for this purpose is SclSetScrollBar(). > > When the logical top row of your table is visible on screen, the "value" > argument to SclSetScrollBar() should be equal to the "min" argument, > typically 0. When the last row of your table is visible on screen, the > "value" should be equal to "max". Or to look at it the other way, if you > called SclGetScrollBar and *valueP were equal to *minP, you should scroll > the table to make logical row 0 visible; but you will more likely want to > do this by responding to scroll events (perhaps with the help of > SclHandleEvent) than by directly calling SclGetScrollBar. > > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
