• 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
Enter in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Enter in NSTableView
      • From: Brian Webster <email@hidden>
  • Prev by Date: Re: OT: Meaning of .m extension
  • Next by Date: Re: SearchKit vs. Lucene
  • Previous by thread: Re: Save a NSAppleScript to a file
  • Next by thread: Re: Enter in NSTableView
  • Index(es):
    • Date
    • Thread