• 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: Simulating a click in NSStepper
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simulating a click in NSStepper


  • Subject: Re: Simulating a click in NSStepper
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 16 Apr 2009 18:51:14 -0600


On Apr 16, 2009, at 3:13 PM, David Alter wrote:

I'm using a NSStepper with the little up and down arrows. I want to simulate
a click where the correct arrow will get highlighted as if someone clicked
into it. I'm unclear how I should do this. I can do a perform click but that
does not specify what arrow to click.
Any suggestions?


You can do this by creating "fake" mouse down and mouse up events, and add them to the application's event queue so that the mouse down event is handled before the mouse up event. See the NSEvent documentation for details on how to make your own events.

Nick Zitzmann
<http://www.chronosnet.com/>



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Simulating a click in NSStepper (From: David Alter <email@hidden>)

  • Prev by Date: Re: NSView modifies CALayer's masksToBounds?
  • Next by Date: Re: Reading in dictionary from txt file: options for speed
  • Previous by thread: Simulating a click in NSStepper
  • Next by thread: Setting a layer delegate affects drawRect being called
  • Index(es):
    • Date
    • Thread