Code for Scrolling the objects in a card

Richard Gaskin ambassador at
Sat Jul 24 11:41:55 CDT 2004

Frank Leahy wrote:

>> What you can't do with the current implementation of groups is put your
>> mouse over the scrolling group and draw a circle.  You can have a
>> button (as in a toolbar) past a circle in the group and have the user
>> then move and size it.  But they can not drag a circle interactively in
>> a group from scratch.
>> This applies to every other object as well. 
> It seems like this would do what you want:
> 1) Make sure the group is pre-populated with a hidden version of every 
> control type.  One circle, one line, one checkbox, etc. (whatever 
> controls you want).
> 2) On mouseDown, have a group handler which positions and sizes the 
> hidden control to the mouse location, and then sets it visible.
> 3) Resize and position the control in real-time in a mouseMove handler.
> 4) On mouseUp, copy the control, and then re-hide the original.
> Wouldn't that do what you want?

It's possible to emulate the pointer tool behaviors with the browse 
tool, but it's a lot of work (ask Jan <g>).  But we already have a 
pointer tool so why should we rewrite all of the pointer tool behaviors 
(marquee selection, handles, etc.) just to get around this one limitation?

Everything in the engine related to drawing is nearly perfect as-is, 
with the two exceptions noted in Bugzilla #623 and #624.

There are many funky workarounds that can be scripted, and indeed I'm 
using them now.  But each is not without its funky-looking drawbacks, 
and none are easily grasped by the new Rev user.

Compare with SuperCard, in which the number of lines of script needed to 
get standard drawing behaviors is zero; the tools simply work like they 
do in all other drawing apps.

  Richard Gaskin
  Fourth World Media Corporation
  Ambassador at

More information about the use-livecode mailing list