Enter in NSTableView
Enter in NSTableView
- Subject: Enter in NSTableView
- From: Ivan Myrvold <email@hidden>
- Date: Sun, 23 Nov 2003 12:09:27 +0100
I have customized NSTableView, where I have an NSComboBoxCell in the
first column. The NSTableView is in a sheet. Here is how I set it up:
- (void)windowDidLoad {
NSComboBoxCell *comboCell;
NSTableColumn *combocolumn = [[ofsbliste tableColumns]
objectAtIndex:0];
comboCell = [[NSComboBoxCell alloc] init];
[combocolumn setDataCell:comboCell];
[comboCell setControlSize:NSSmallControlSize];
[comboCell setFont:[NSFont systemFontOfSize:[NSFont
smallSystemFontSize]]];
[comboCell setEditable:YES];
[comboCell setCompletes:YES];
[comboCell setAction:@selector(selectedItem:)];
[comboCell setTarget:self];
combocolumn = [[oikkefsbliste tableColumns] objectAtIndex:0];
[combocolumn setDataCell:comboCell];
[comboCell release];
.....
I am happy how this works, but for one small detail. When I hit enter,
I would like to have the action for the OK button activated. How it
works now is that the next row in the NSTableView is selected, and I
would like to have that changed. Any tips for how I could implement
that?
Ivan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.