• 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: Contextual menu click in window title
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Contextual menu click in window title


  • Subject: Re: Contextual menu click in window title
  • From: Todd Yandell <email@hidden>
  • Date: Fri, 9 Sep 2005 00:45:23 -0500

Hi Mark,

There's no need to subclass NSWindow or to try to handle "mouseDown:" in an NSWindow subclass. Just use NSWindow's "setRepresentedFilename:" method to add a proxy icon to your window's title bar. This will only work, of course, if the data you need to represent is on the local machine, since it requires a file system name.

If you want to do something else in the titlebar (for example, like Safari's titlebar), you can always add a custom view to the window. Just grab one of the standard window buttons using "standardWindowButton:", then add your custom view to the button's superview. From there you can handle clicks or show a popup menu.

Hope that helps,
Todd

_______________________________________________
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


References: 
 >Contextual menu click in window title (From: Mark Alldritt <email@hidden>)

  • Prev by Date: Re: Undoable controls
  • Next by Date: Missing font?
  • Previous by thread: Re: Contextual menu click in window title
  • Next by thread: Re: Contextual menu click in window title
  • Index(es):
    • Date
    • Thread