• 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: Programmatically show NSPopUpButton menu?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically show NSPopUpButton menu?


  • Subject: Re: Programmatically show NSPopUpButton menu?
  • From: Uli Kusterer <email@hidden>
  • Date: Sat, 28 Oct 2006 11:40:16 +0200

Am 27.10.2006 um 00:06 schrieb Jerry Krinock:
on 06/10/26 16:46, Keith Blount at email@hidden wrote:
I would like to bring up the menu of an NSPopUpButton programmatically - ie.
without the user having to click on the button itself. This may sound strange,

I was thinking of doing the same thing, but for a main menu. I haven't
gotten around to trying it yet, but I read in the list archives that, in
general, to make simulated mouse clicks, you find the (x,y) location of the
control you want to click, and then feed this location to
CGEventCreateMouseEvent. Give it a try and let me know if it works!

While you're at it, make sure you also test it in cases where the thing to be clicked is covered by another window, or the application is hidden. Wouldn't want to accidentally hit the "yes" button of a "really empty trash" panel that's on the screen.


Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ 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: 
 >Re: Programmatically show NSPopUpButton menu? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: KVC and Bindings Question
  • Next by Date: Re: Spotlight or some other way!
  • Previous by thread: Re: Programmatically show NSPopUpButton menu?
  • Next by thread: Re: Programmatically show NSPopUpButton menu?
  • Index(es):
    • Date
    • Thread