Re: Displaying a menu at arbitrary location.
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.