Drag&Drop onto Button
Drag&Drop onto Button
- Subject: Drag&Drop onto Button
- From: "Mohit Gupta" <email@hidden>
- Date: Fri, 7 Feb 2003 09:49:58 +0530
Hi,
I am trying to drop onto a button. Unlike for tableView/outlineView, I
couldn't find any method like "validatedrop" and "acceptdrop" for a button.
Thus I registered the whole window to accept the drop.
Task: To change the image of the button when the drag enters into it and
revert back to the original image if the drag&Drop is
successful/unsuccessful.
-I tried using tracking rectangles to know if the mouse enters a button,
however mouseEntered method doesn't get called(when you drag into a button)
until the mouse is released.
-So I tried using the draggingEntered, the cursor location that I get from
the draggingLocation method of the draggingInfo doesn't help, as the drag
image enters the destination before the cursor does.
-Now I am using the draggingUpdated to get the new button-image, If the
drag happens the I can use performDragOperation to revert back to the
original image. If the drag does not happen then how do I revert back to
the original image (the draggingExited is called only when the drag leaves
the window, as the window is registered to accept drop).
am stuck on this...
Mohit
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.