Scrollbar

Ken Ray kray at sonsothunder.com
Sun Feb 17 16:39:01 EST 2002


The closest I can come to what you want is:

set the style of sb 1 to "scale"
set the startValue of sb 1 to 1
set the endValue of sb 1 to 3
set the thumbSize of sb 1 to 1
set the pageInc of sb 1 to 2
set the lineInc of sb 1 to 1  -- this is ignored in scales though

The scrollbar has this script:

on scrollbarDrag
  set the thumbPos of me to (the thumbpos of me)
end scrollbarDrag

This sort of "snaps" to the proper thumbpositions, but it flickers as it's
doing so. I'll keep hunting for a better solution, but it would be great if
Rev had a "snapToPage" property (or equivalent) that would take the
flickering away.

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

----- Original Message -----
From: <Roger.E.Eller at sealedair.com>
To: <use-revolution at lists.runrev.com>
Sent: Sunday, February 17, 2002 2:32 PM
Subject: Re: Scrollbar


>
> > No, I don't see, I think you don't understand what I mean: I use a
> scrollbar
> > in fact a scale. I want that only three positions are possible.
> > You see? Like a switch with the sound "clic-clic-clic" each time that a
> > position is passed.
> >
> > So how is it possible
> >>>
> >>
> >> Just drag the scrollbar "bigger" until the value appears under the
> >> scrollbar...
> > OK! I'm a little stupid! :=)
>
> I could not do it either... exactly, so this was my attempt.
> In the properties of the scrollbar, I set the Start Value to 1 and the End
> Value to 3.
> No matter what, the arrow that indicates thumbPosition did not "snap" to
> the absolute position of 1, 2, or 3.
> So I made a Plus and Minus button which contained this script
>
> on mouseUp
>   if the name of me = "+" then
>        set the thumbPosition of sb "SB1" to (the thumbPosition of sb
"SB1")
> +1
>     else
>        set the thumbPosition of sb "SB1" to (the thumbPosition of sb
"SB1")
> -1
>   end if
> end mouseUp
>
> That works, but not when dragging the actual arrow of the Scrollbar.
>
> ~Roger Eller  <roger.e.eller at sealedair.com>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list