Drag & Drop cursor

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mmiele
Posts: 55
Joined: Sun Jan 21, 2007 1:25 pm
Location: Naples, Italy

Drag & Drop cursor

Post by mmiele » Sun Sep 23, 2012 10:31 am

Hi All.

Anyone knows if there is a way to hide the drag and drop cursor (the one with the green plus sign) when a dragImage is set (at last on Mac)?
In other world, I'd like to see the dragImage only.

Thanks in advance,
Mario

Klaus
Posts: 13863
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Drag & Drop cursor

Post by Klaus » Sun Sep 23, 2012 12:01 pm

Buongiorno Mario,

the cursor is actually evoked when you: set the dragaction to "copy" 8)

I don't think you can get rid of that SYSTEM cursor when you use dragstart etc.

Maybe you could script the complete "Drag'n'Drop" behaviour yourself, but you need to ask yourself
is that worth the effort, which is not small?


Best

Klaus

mmiele
Posts: 55
Joined: Sun Jan 21, 2007 1:25 pm
Location: Naples, Italy

Re: Drag & Drop cursor

Post by mmiele » Sun Sep 23, 2012 12:33 pm

Hi Klaus,

I have no dragAction setting at all (look at the code below): it seems as it just needs to start the drag action to make the cursor appear.
Anyway you're right, it doesn't worths the effort to rewrite the complete behaviour.
Setting a property (or simple things like that) would be a different matter.

Code: Select all

on mouseDown
   set the dragData["text"] to empty
end mouseDown

on dragStart
   set the dragImageOffset  to the width of the target*0.5,the height of the target *0.5
   set the dragImage to the id of the target
   pass dragStart
end dragStart

Klaus
Posts: 13863
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Drag & Drop cursor

Post by Klaus » Sun Sep 23, 2012 1:03 pm

Hi Mario,
mmiele wrote:Hi Klaus,

I have no dragAction setting at all (look at the code below): it seems as it just needs to start the drag action to make the cursor appear.
ah, OK, sorry, my fault. Looks like any "dragxxxx" things will show the system D'n'D cursor.
mmiele wrote:Anyway you're right, it doesn't worths the effort to rewrite the complete behaviour.
Setting a property (or simple things like that) would be a different matter.
Sorry, don't know of any property that would affect this behavior...


Best

Klaus

Post Reply

Return to “Talking LiveCode”