Basic scrollbar question

Ken Ray kray at sonsothunder.com
Tue Sep 21 11:53:41 EDT 2004


On 9/21/04 7:08 AM, "david at anon.nu" <david at anon.nu> wrote:

> I have this scroll bar - horizontal, scale style, with showValue off
> 
> I am using it as a control to allow scrolling from a start date to an
> end date (dates in seconds). So I set the start and endValues.
> 
> Next I set the lineInc to 24*60*60 which jumps a day - ok
> 
> But I have to set the pageInc as follows to: 8*24*60*60 ??? Why not 7?

I don't know for sure, but here's my guess: I think you need to account for
a "0" for the number of pages, so for 7 pages, you actually get 0-7 instead
of 1-7, and 0-7 is actually 8 "pages".

> Also not sure how to control the marks - it would make sense if they
> were representing the pageInc value - but it is a smaller setting.

It actually represents the pageInc value *plus one* (I'm assuming for the
"0" setting). So if I set up a scale with a min of 0 and a max of 100, with
a pageInc of 10 and a lineInc of 1, I'll get 11 tick marks, for:

0  10  20  30  40  50  60  70  80  90  100

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the metacard mailing list