Re: keyboard shortcut for segments of a segmented control?
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