• 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: keyboard shortcut for segments of a segmented control?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: keyboard shortcut for segments of a segmented control?


  • Subject: Re: keyboard shortcut for segments of a segmented control?
  • From: Graham Cox <email@hidden>
  • Date: Sat, 7 Aug 2010 12:45:09 +1000

On 07/08/2010, at 2:03 AM, Brian Postow wrote:

> I have a segmented control to do up and down pages, that lives in an NSToolbar. I'd like to make it so that up and down arrow select the 0 and 1 segment respectively. However, I don't see a "Key equivalent" in the object inspector...
>
> A little research shows that the fact that its in a toolbar is irrelevant...


I think the way to do this would be to respond to the -keyDown: event by calling the same page up/down methods that the buttons end up calling, so they have the same effect. To provide visual feedback, some controls support a 'simulateClick' method (not sure if that's the right method name; not sure about segmented controls) or you might just have to briefly set the state of the segment. The controller would have an outlet to the segmented control to permit this.

--Graham


_______________________________________________

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: 
 >keyboard shortcut for segments of a segmented control? (From: Brian Postow <email@hidden>)

  • Prev by Date: Re: NSPathControl w/ popups and icons
  • Next by Date: Re: Main Thread Crashing in Multithreaded App
  • Previous by thread: keyboard shortcut for segments of a segmented control?
  • Next by thread: Scroller With CATiledLayer Running out of Memory
  • Index(es):
    • Date
    • Thread