Slip, sliding away

Paul Dupuis paul at researchware.com
Mon Jul 25 08:54:05 EDT 2016


Put the following in the script of the image that is inside the
scrolling group. You may also want to change the cursor to a hand on
mouseDown

on mouseDown
  set the hMin of me to 0
  set the hPos of me to item 1 of the mouseLoc
  set the hMax of me to the width of me
end mouseDown

on mouseStillDown
  get item 1 of the mouseloc
  put (the hPos of me - it) into tDelta
  set the hPos of me to it
  get the hScroll of the owner of me
  add tDelta to it
  if it < the hMin of me then put 0 into it
  if it > the hMax of me then put the hMax of me into it
  set the hScroll of the owner of me to it
end mouseStillDown


On 7/25/2016 5:32 AM, Richmond wrote:
> I made a loooong rectangular image (3 times wider than my stack) and
> grouped it
>
> into a group the width of my stack and gave it a horizontal scrollbar;
> so I can scroll the image
>
> laterally using the scrollbar . . . surprise, surprise; and jolly s*xy
> it looks too.
>
> I would look even s*xier if it had NO scrollbar and I could do some
> sort of
>
> 'constrained grab'/scroll by doing a mouseDown & horizontal drag on
> the image within the group.
>
>
> Does anyone know how to do this.
>
> Just to stimulate interest, the reason is that I want to do this sort
> of thing
>
> in Livecode: http://www.stefanv.com/calculators/aristo970/index.html
>
> Richmond.
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>





More information about the use-livecode mailing list