scrollbarDrag question...

Ken Ray kray at sonsothunder.com
Thu Mar 30 21:42:45 EST 2006


On 3/30/06 5:54 PM, "Garrett Hylltun" <garrett at paraboliclogic.com> wrote:

> Rev 2.6.1
> 
> Greetings,
> 
> 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?

Well, you could store the current hScroll and vScroll values in a custom
property, and then when you get the scrollbarDrag message, compare the
hScroll and vScoll against the stored values. Whichever one changed is the
culprit. Then just make sure to set your custom properties to the new values
so you can check the next time...

I'm curious, though - why would you need to know which sent the message?

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




More information about the Use-livecode mailing list