Dragging from a list field

Wilhelm Sanke sanke at hrz.uni-kassel.de
Sat Aug 27 17:18:52 EDT 2005


On Sat, 27 Aug 2005, J. Landman Gay" <jacque at hyperactivesw.com> wrote:

> I have a list field that operates like an index; clicking on a line
> causes the stack to display content based on the text of the line.
>
> I also need the field to support drag and drop, so that users can create
> their own lists by dragging lines from the index into a different field
> in a substack.
> (snip)
> Does anyone have a trick for making a list
> field behave in two different ways -- that is, normal line selection as
> well as supporting dragging lines to another field?
>
> -- Jacqueline Landman Gay


Hi Jacqueline,

I am not sure if this meets exactly your expectations, but you might 
have a look at my sample stack "Dragging with List Fields" on page 
"Tools and Samples for Development of my site 
<http://www.sanke.org/MetaMedia> (scroll down to the bottom of the page).

Of the six examples offered in the samples stack try example 1 "sample 
stack with three fields" of 1. "between list fields". You would have to 
change the script of field 1 - or one of the other fields - to accept a 
right-button mouseclick to distinguish between normal list behavior and 
dragging from the list.

add "on mousedown x
       if x is 3 then"

to the field script and you could then have normal list behavior and at 
the same time dragging behavior when the other mouse button is being 
pressed.

Best regards,

Wilhelm





More information about the use-livecode mailing list