How to tab between textfields in a collection view?
How to tab between textfields in a collection view?
- Subject: How to tab between textfields in a collection view?
- From: Antonio Nunes <email@hidden>
- Date: Sat, 22 Dec 2007 18:40:15 +0000
Hi,
I am exploring NSCollectionView and created one that lays out
NSTextFields in a grid. So far, so good. Works great. I would like to
be able to tab to the next text field using the tab key, but currently
hitting tab just selects the text in the field.
I tried setting each text field's nextKeyView as it is added to the
collection but to no avail, the behaviour was not affected at all:
@implementation HerCollectionView
- (NSCollectionViewItem *)newItemForRepresentedObject:(id)object
{
static NSCollectionViewItem *previousItem;
NSCollectionViewItem *item = [super
newItemForRepresentedObject:object];
if (previousItem != nil) {
previousItem.view.nextKeyView = item.view.nextKeyView;
}
previousItem = item;
return item;
}
@end
Is there a way to accomplish the stated objective?
-António
-----------------------------------------------
Touch is a language without words
-----------------------------------------------
_______________________________________________
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