Skip navigation.
 
mlRe: Modifying cursor for DnD
FROM : Gerd Knops
DATE : Mon Nov 22 23:29:28 2004

On Nov 21, 2004, at 7:40 PM, ’–Áí“ a.k.a. James Chen wrote:

> Hi,
> As a NSDraggingDestination, you could implement
> - (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
> to change the operation dynamically. Once you change the operation,
> the cursor will be changed.


That wasn't the question. The question was how to set custom cursor
images for DnD operations.

I resolved to creating a timer at the end of draggingEntered: and
draggingUpdated: if the dragOperation changed. The timer uses a very
short delay, and sets the cursor when it fires. Without the timer there
are some special situations where the systems updates the cursor after
I did.

Quite ugly, but works OK so far.

Gerd


> HTH,
> James
> ------------------------------------
> Ulead Systems Inc.
> James Chen
> Software Engineer
> Image Div.
> ------------------------------------
> On Nov 19, 2004, at 4:05 AM, Gerd Knops wrote:
>

>> Hi,
>>
>> I checked the documentation but so far came up empty. Is there any
>> (preferably elegant) way to have a drop target set the cursor for the
>> intended drop operation? Eg add to the white '+' in the green circle
>> when also NSDragOperationPrivate is selected etc?
>>
>> Basically I have an application that besides reacting normal to move
>> (no modifier) and copy requests (Alt-drop) will also create a new
>> folder for the dropped items when Cmd is pressed, and any combination
>> of the above. I'd like to have the cursor reflect that behavior, but
>> do not see any aobvious way how to achieve that.
>>
>> Any pointers?
>>
>> Thanks
>>
>> Gerd
>>
>> _______________________________________________
>> MacOSX-dev mailing list
>> <email_removed>
>> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>>

>
> _______________________________________________
> MacOSX-dev mailing list
> <email_removed>
> http://www.omnigroup.com/mailman/listinfo/macosx-dev

Related mailsAuthorDate
mlModifying cursor for DnD Gerd Knops Nov 18, 21:05
mlRe: Modifying cursor for DnD ??? a.k.a. James C… Nov 22, 02:40
mlRe: Modifying cursor for DnD Gerd Knops Nov 22, 23:29