• 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: NSMenu to show on when press button on Normal Click
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMenu to show on when press button on Normal Click


  • Subject: Re: NSMenu to show on when press button on Normal Click
  • From: Esteban Uribe <email@hidden>
  • Date: Mon, 14 Apr 2003 13:27:48 -0700

On Monday, April 14, 2003, at 11:35AM, Chad Eckles <email@hidden> wrote:

>Hello all I know how to Connect the menu to the control and have it show
>when you click it with the right mouse button but how do I get the menu to
>show when I press the button with the normal click ?
>_______________________________________________

Subclass the NSButton and overrid -mouseDown

then run NSMenu's + (void)popUpContextMenu:(NSMenu *)menu withEvent:(NSEvent *)event forView:(NSView *)view

Look at NSMenu's documentation for more information
<http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSMenu.html#BBCJEHGB>
_______________________________________________
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.

  • Prev by Date: Re: Inconsistent Memory Management Rules
  • Next by Date: Safari & Cocoa
  • Previous by thread: NSMenu to show on when press button on Normal Click
  • Next by thread: [ANN] a new repository of Cocoa snippets
  • Index(es):
    • Date
    • Thread