Questions tagged [nstableview]

An Apple object that displays data for a set of related records, with rows representing individual records and columns representing the attributes of those records.

NSTableView is OSx component and not be confused with UITableView(an iOS component).

2170 questions
74
votes
8 answers

Double click an NSTableView row in Cocoa?

I need my application to open a window when a user double clicks on a row in an NSTableView. I'm having a bit of a difficult time finding information or examples on how to accomplish this. Can anybody point me in the right direction?
Allyn
  • 19,710
  • 16
  • 55
  • 68
53
votes
4 answers

Hiding NSTableView header?

How do I hide an NSTableView header completely, so that it does not take any space up?
Kristina Brooks
  • 14,589
  • 25
  • 101
  • 178
44
votes
14 answers

Change selection color on view-based NSTableView

Standard highlighting color in OS X applications is blue. Is it possible to change it to another color, e.g. gray? Note that I am using the new view-based NSTableView available starting from OS X 10.7.
Dev
  • 7,041
  • 6
  • 33
  • 63
43
votes
3 answers

How can I have the only column of my NSTableView take all the width of the TableView?

I am currently trying to learn a bit of Cocoa (using the book Cocoa Programming for Mac OS X). In one of the exercises, we set up a NSTableView with only one column, to act as a list of things. What annoys me is that in Interface Builder, I could…
tsimbalar
  • 5,348
  • 6
  • 37
  • 55
32
votes
6 answers

NSTableView only displaying "Table View Cell"

I have a NSTableView with the delegate and datasource pointing to my controller. I have tried implementing the - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex Method, but no…
Kyle
  • 16,103
  • 26
  • 123
  • 231
31
votes
3 answers

Programmatically creating an NSTableView (trouble getting the NSHeaderView to show up)(cocoa osx)

I am making an NSTableView programmatically but for some reason no matter what I do, I cannot make the darn headerView show up. It is imperative that I do this programmatically and not use the IB because I am actually developing this widget in an…
Mike2012
  • 7,159
  • 13
  • 76
  • 131
30
votes
1 answer

Selecting A Row In An NSTableView Programmatically

I want to Select A Row in my table view programmatically, I believe I would use selectRowIndexes:byExtendingSelection: (is this a delegate method?). The other thing is how would I use that method to select the second row (in programming terms row…
Joshua
  • 14,412
  • 21
  • 96
  • 171
28
votes
6 answers

Respond to mouse events in text field in view-based table view

I have text fields inside a custom view inside an NSOutlineView. Editing one of these cells requires a single click, a pause, and another single click. The first single click selects the table view row, and the second single click draws the cursor…
paulmelnikow
  • 16,036
  • 6
  • 56
  • 110
26
votes
6 answers

NSTableView: detecting a mouse click together with the row and column

I'm trying to detect when a mouse click occurs in an NSTableView, and when it does, to determine the row and column of the cell that was clicked. So far I've tried to use NSTableViewSelectionDidChangeNotification, but there are two problems: It…
bright
  • 4,298
  • 1
  • 30
  • 52
25
votes
4 answers

How to make NSTableView scroll to most recently added row?

I'm dynamically adding rows to an NSTableView. When I issue [table reloadData] I can see the scroll view move and if I move it by hand I can see the new value on the table. But how can I scroll it automatically?
ruipacheco
  • 11,526
  • 14
  • 63
  • 116
23
votes
4 answers

Opening a gap in NSTableView during drag and drop

I've got a simple, single-column, view-based NSTableView with items in it that can be dragged to reorder them. During drag and drop, I'd like to make it so that a gap for the item-to-be-dropped opens up at the location under the mouse. GarageBand…
Andrew Madsen
  • 20,769
  • 5
  • 52
  • 92
22
votes
10 answers

Is it possible to design NSCell subclasses in Interface Builder?

I'm trying to subclass NSCell for use in a NSTableView. The cell I want to create is fairly complicated so it would be very useful if I could design it in Interface Builder and then load the NSCell from a nib. Is this possible? How do I do it?
Benedict Cohen
20
votes
9 answers

Drag & Drop Reorder Rows on NSTableView

I was just wondering if there was an easy way to set an NSTableView to allow it to reorder its rows without writing any pasteboard code. I only need it to be able to do this internally, within one table. I have no issue writing the pboard code,…
Jared Pochtar
  • 4,727
  • 2
  • 23
  • 38
19
votes
8 answers

NSTableView - Disable Row Selection

I have a NSTableView and I want to disable row selection. The columns of the table view are bound to a NSArrayController and the content of the array does show up in the table view. How can I do this just using bindings?
ericg
  • 7,324
  • 6
  • 39
  • 66
19
votes
3 answers

View based NSTableView editing

I'm not sure what I'm doing wrong. Since I couldn't find any other questions (or even documentation) about this, it seems do be normally working without problems for other people. I'm simply trying to get a view based NSTableView to do support…
Zaggo
  • 680
  • 1
  • 6
  • 13
1
2 3
99 100