Re: Draggable buttons
Re: Draggable buttons
- Subject: Re: Draggable buttons
- From: Matt Neuburg <email@hidden>
- Date: Sat, 2 Feb 2002 17:19:13 -0800
On Sat, 2 Feb 2002 12:52:15 -0500, Ben Chess <email@hidden> said:
>
The only way to start a non-TableView drag that I know of is
>
dragImage:at:offset:event:pasteboard:source:slideBack. The docs state
>
clearly that this is to only be called from a mouseDown event. Throwing
>
caution into the wind, I tried saving the mouseDown event and then not
>
making a call to dragImage until a move occurs, but it doesn't work
>
correctly. It seems to be capturing mouse movements, but the image
>
dragged is never drawn.
>
>
I'm doing something like this in an NSResponder subclass:
>
-(void)mouseDown:(NSEvent *)theEvent
>
-(void)mouseMoved:(NSEvent *)theEvent
In a similar situation recently I found the example in the docs
(HandlingMouseEvents.html) very helpful. Basically you just run your own
event loop inside the mouseDown event and see what develops. m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/