scrollbarDrag question...

Richard Gaskin ambassador at fourthworld.com
Fri Mar 31 00:02:02 EST 2006


J. Landman Gay wrote:

> Garrett Hylltun wrote:
>> I have a field with the "dontWrap" set to true, so both horizontal and 
>> vertical scrollbars are available to the field.
>> 
>> In using the scrollbarDrag message, I found that both horz and vert 
>> scrollbars send the message and I have no way to differentiate between 
>> the two.
>> 
>> Is there a way to find out which scrollbar sent the message?
> 
> Try checking "the target".

Unfortunately "the target" only returns a reference to the field; 
scrollbars attached to a field are not addressible as distinct objects.

I just added a request for a param to scrollBarDrag to identify the 
scrollbar being moved:
<http://support.runrev.com/bugdatabase/show_bug.cgi?id=3476>

In the meantime I've used this workaround:

on scrollBarDrag
   if the clickV > the bottom of me - 16 then
     -- do horizontal scrollbar stuff:

   else
     -- do vertical scrollbar stuff:

   end if
end scrollBarDrag


-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com



More information about the Use-livecode mailing list