Determining which scrollbar was scrolled in a field with both H and V scrollbars

Björnke von Gierke bvg at mac.com
Tue Jun 9 09:33:27 EDT 2009


It's not perfect, but will give you a proper result, i think.

untested:

on scrollbarDrag --theDrag --param not sent for fields, evil
   if the vScroll of me = the PrevScrollV of me
     put true into vScrolled
   else
     put false into vScrolled
   end if
   if the hScroll of me = the PrevScrollH of me
     put true into hScrolled
   else
     put false into hScrolled
   end if
   put vScrolled,hScrolled
   set the prevScrollV of me to the vScroll of me
   set the prevScrollH of me to the hScroll of me
end scrollbarDrag

have fun
björnke

On 4 Jun 2009, at 17:18, Paul Dupuis wrote:

> This may be a dumb question, but does anyone know of a way to  
> determine which scrollbar (horizontal or vertical) was scrolled in a  
> field with both a horizontal and vertical scrollbar when the  
> scrollBarDrag message (or any of the scrollBar* messages) are sent  
> to that field?

-- 

official ChatRev page:
http://bjoernke.com/runrev/chatrev.php

Chat with other RunRev developers:
go stack URL "http://bjoernke.com/stacks/chatrev/chatrev1.3b3.rev"




More information about the use-livecode mailing list