Re: Draggable buttons
Re: Draggable buttons
- Subject: Re: Draggable buttons
- From: John Timmer <email@hidden>
- Date: Sun, 18 Sep 2005 11:36:57 -0400
Apple's got example code somewhere on how to create an irregular shaped
borderless window (a quick try at searching failed). The window allows you
to drag it around the screen on mouse down events. It's pretty easy to
translate the basic principles to dragging a view.
The only other thing you need is for your view to check its superview's
frame at the start of the drag, and use these as limits to keep it on
screen.
If you can't find the code, I've got a similar thing done for a text view,
and I can send it by email off list.
Cheers,
JT
> Is anyone aware of any examples overriding NSButton to create a
> draggable button?
>
> I am attempting to make a palette that the user can arbitrarily drag
> and arrange buttons on.
_______________________________________________
This mind intentionally left blank
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden