• 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: Displaying a menu at arbitrary location.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying a menu at arbitrary location.


  • Subject: Re: Displaying a menu at arbitrary location.
  • From: Nicholas Riley <email@hidden>
  • Date: Sun, 12 May 2002 19:27:51 -0500
  • Resent-date: Sun, 12 May 2002 19:28:05 -0500
  • Resent-from: Nicholas Riley <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: email@hidden

On Sun, May 12, 2002 at 07:08:21PM -0500, Alex Keresztes wrote:
> Since NSButton is a subclass of NSView, you could use NSView's method:
>
> - (NSMenu *)menuForEvent:(NSEvent *)theEvent
>
> Take a look at the docs on NSView for more info.

The problem with this is that it only allows you to return a menu, not
specify where it is popped up. If you're happy with the functions of
the basic Cocoa controls which can pop up menus, then by all means use
them; my suggestion is only if you want a menul popped up somewhere
else, to simulate Carbon's greater flexibility in this area.

--
=Nicholas Riley <email@hidden> | <http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
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.

References: 
 >Re: Displaying a menu at arbitrary location. (From: Nicholas Riley <email@hidden>)
 >Re: Displaying a menu at arbitrary location. (From: Alex Keresztes <email@hidden>)

  • Prev by Date: Re: Displaying a menu at arbitrary location.
  • Next by Date: Re: NSTask for Java?
  • Previous by thread: Re: Displaying a menu at arbitrary location.
  • Next by thread: Re: Displaying a menu at arbitrary location.
  • Index(es):
    • Date
    • Thread