Getting vScroll movement of a field scrollbar

James Hurley jhurley0305 at sbcglobal.net
Tue Dec 11 15:23:51 EST 2007


My thanks to all who replied.

Eric's protocol works wonderfully well--see his description below.

(When he says that "this makes the button disappear appropriately" I  
think he means that the button will disappear as it passes off the  
top of the field.)

Very slick.

Jim


> Message: 20
> Date: Tue, 11 Dec 2007 16:02:08 +0100
> From: Eric Chatonet <eric.chatonet at sosmartsoftware.com>
> Subject: Re: Getting vScroll movement of a field scrollbar
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <7A404ABC-7D1F-466A-AA38-2C30726A921C at sosmartsoftware.com>
> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed
>
> Hi Jim,
>
> May be I don't understand the problem ;-)
> But:
>
> I created a scrolling field, added a button overlaying the field and
> grouped both with group margins = zero.
> Then I locked the group: this makes the button disappear  
> appropriately.
>
> In the script of the field:
>
> on scrollbardrag pPos
>    set the top of btn "Test" to <value> - pPos
> end scrollbardrag
>
> <value> is the top of the button when field's vScroll = zero.
>
> In the script of the card:
>
> on preOpenCard
>    send "scrollbardrag" && the vScroll of fld "ScrollingField" to fld
> "ScrollingField"
> end preOpenCard
>
> Actually this works for me in any case and I don't mind any initial
> position :-)
> What did I miss?



More information about the use-livecode mailing list