• 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
Canceling a pop-up menu, continued
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Canceling a pop-up menu, continued


  • Subject: Canceling a pop-up menu, continued
  • From: Peter Maurer <email@hidden>
  • Date: Fri, 16 Jan 2004 04:32:48 +0100

Is there any way to programatically cancel the display of a menu that has been activated with NSMenu's popUpContextMenu:withEvent:forView:?

Or can I do this with the carbon menu manager? (I'm aware of my NSMenu's MenuRef anyway.)

I forgot to mention: An easy solution would be to simulate an [esc] keystroke with NSEvent's keyEventWithType and then have my NSApp post this event. I just tested it, and it works.

But that somehow doesn't feel like the way one _should_ do it. Is there an "official" way?

Peter Maurer.
_______________________________________________
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: 
 >Canceling a pop-up menu? (From: Peter Maurer <email@hidden>)

  • Prev by Date: Re: Releasing an NSTask
  • Next by Date: Cocoa equivalent to TK canvas widget
  • Previous by thread: Canceling a pop-up menu?
  • Next by thread: Re: Canceling a pop-up menu?
  • Index(es):
    • Date
    • Thread