• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Draggable buttons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Draggable buttons
      • From: "John C. Randolph" <email@hidden>
References: 
 >Draggable buttons (From: David Campbell <email@hidden>)

  • Prev by Date: XCode
  • Next by Date: Re: How to customize NSDocument's error message 'The document ... could not be opened'
  • Previous by thread: Draggable buttons
  • Next by thread: Re: Draggable buttons
  • Index(es):
    • Date
    • Thread