Scrolling a Card?
Ken Norris
pixelbird at interisland.net
Sat Feb 21 03:55:50 EST 2004
> Date: Sat, 21 Feb 2004 00:28:38 -0700
> From: Dar Scott <dsc at swcp.com>
> Subject: Re: Scrolling a Card?
> Are you setting the scroll on
> the card group?
-----------
Yep. A map with both scrollbars and a grab ability is the model I'm looking
for. Gives the user more options, i.e., all-axis fine scrolling control.
Like this:
I want to scroll the card group by faking a grab. Obviously you can't grab
the group, because the scrollbar objects themselves would move with it. No
good.
What needs to happen is to grab the _scroll_ of the group such that the
_content_ sticks to the mouse, and the scrollbars follow it. It gives the
user fine all-axis control, like a grab.
But, in order for it to work within the scroll limits, I figured you have to
bound it by those limits. I want it to stop scrolling safely when you get to
a max or min scroll limit, IOW, grabbing and moving when it gets there won't
make it move any futher.
The problem has been that executing a grab using the mouse offset and a
max/min expression with the scroll (hScroll,vScroll) causes it to move like
the scrollbars work, i.e., opposite the drag direction, rather than sticking
to the mouse, i.e., moving exactly with it. Grab and drag it a ways, release
and move back, grab an drag it some more, etc.
Thus, it needs to operate like a normal grab of an object, _but_ work with
the actual scroll, moving the thumbs with it, and in the proper way.
Not so easy to do. I haven't seen an example.
Thanks again,
Ken N.
More information about the use-livecode
mailing list