Questions tagged [nstablecellview]

The NSTableCellView class of Cocoa, is a reusable container view shown for a particular cell in an NSTableView instance that uses rows for content.

124 questions
9
votes
3 answers

View-based NSOutlineView without NIB?

NSOutlineView is a subclass of NSTableView. And currently, NSTableView supports two implementations. Cell-based. View-based. To make OSX 10.8 Finder style side bar (with automatic gray Icon styling), need to use view-based table view with…
eonil
  • 83,476
  • 81
  • 317
  • 516
8
votes
1 answer

How to get the height of an NSTableCellView that uses autolayout

I have a view-based NSTableView. I positioned the textField and other elements in an NSTableCellView in Interface Builder with autolayout. How can I get the height for the cell based on its autolayout parameters? This answer is the closest I have…
titaniumdecoy
  • 18,900
  • 17
  • 96
  • 133
7
votes
2 answers

NSStepper in NSTableCellView has no effect

I’m using a regular (not subclassed) NSTableCellView in a view-based table view. It has the initial image and text field views. I added an NSStepper to the view. The text field is bound to tableCellView.objectValue.quantity. The stepper’s value is…
wdyp
  • 560
  • 4
  • 16
7
votes
2 answers

Custom NSTableView with custom NSTableCellView?

I would like to create an NSTableview with custom NSTableCellViews. Here is what I have right now: A nib file for the cell (view nib) called CustomCell.xib A custom class for my cell called CustomCell And the code in my AppDelegate.m: Here I…
the_critic
  • 12,720
  • 19
  • 67
  • 115
6
votes
0 answers

NSTableCellView dynamic height with NSTextField multiline autolayout

I have a view-based NSTableView and NSTableCellView subclass which having multiline NSTextField with word-wrap enabled. Now I want my table to have dynamic row height according to textfield content. Autolayout is also enabled. Textfield's…
6
votes
2 answers

NSTableCellView padding

How can I add padding to a NSTableCellView? I want the contents to have a padding of 10px, similar to how you would do it in plain HTML. (All sides). The text should be vertically centered in the middle. At the moment I'm doing this in a subclass…
user429620
6
votes
2 answers

How to connect outlet in a table cell view?

I am using a view-based table, and I want to create an outlet for an element in a cell view. I cannot get the outlet to connect though... it's always nil. Specifically, I have a NSProgressIndicator in a table cell and want to manipulate it in…
tenfour
  • 36,141
  • 15
  • 83
  • 142
6
votes
2 answers

Custom drag image with NSTableView as drag source

Is it necessary to subclass NSTableView or NSTableCellView to create a custom drag image when the tableView is the drag source? If not, what is the magic method I am missing to do this? I cannot seem to find anything solid. NSTableCellView…
uchuugaka
  • 12,679
  • 6
  • 37
  • 55
5
votes
1 answer

Adding a NSMenu to a NSTableCellView which pops up on right click

I want to popup a NSMenu when the user right-clicks on a NSTableCellView within a NSTableView. let cell = myTableView.make(withIdentifier: "myCustomTableCellView", owner: self) as! MyTableCellView // subclass of NSTableCellView let menu =…
ixany
  • 5,433
  • 9
  • 41
  • 65
5
votes
2 answers

How can I make a button inside a NSTableViewRow respond to the represented object

I've been fighting with this problem for quite some time. I'm working on a file copy manager module, so far I have been able to make everything work perfectly with the exception of the cancel button. For some reason when I click the cancel button…
larod
  • 435
  • 3
  • 11
5
votes
1 answer

Why NSTableCellView.backgroundStyle is never set to NSBackgroundStyle.Dark for selected row?

In a view-based NSTableView, I have a subclass of NSTableCellView. I want to change text color for the selected row's cellView. class CellView: NSTableCellView { override var backgroundStyle: NSBackgroundStyle { set { …
Nikolay Tsenkov
  • 1,128
  • 10
  • 26
5
votes
1 answer

How to change NSTableCellView's height when using storyboards in Interface Builder

When I create a non-storyboard OSX app and add a Table View from the Object Library to my main window in Interface Builder, I am able to change the height of an NSTableCellView inside that Table View. Doing so, automatically changes the TableView's…
5
votes
4 answers

How to trigger an action from a NSTableCellView in view based NSTableView when using bindings

I'm facing a problem with a view-based NSTableView running on 10.8 (target is 10.7, but I think this is not relevant). I'm using an NSTableView, and I get content values for my custom NSTableCellView through bindings. I use the obejctValue of the…
4
votes
1 answer

How can I add subclass to NSTableCellView?

I add an Image & Text Table Cell View to NSTable in IB. There is a TextFiled and a ImageView in the Text Table Cell View, so my code looks like this: - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn…
PerterPon
  • 105
  • 1
  • 9
4
votes
0 answers

Why does [[NSTableCellView alloc] init] produce a nil- text field?

The log lines below will show "Table cell: [valid value logged here]" but "Text field: (null)". I'm actually trying to build an NSOutlineView programmatically, and it works with a cell-based approach, but not with a view-based approach. Can someone…
magnus
  • 4,031
  • 7
  • 26
  • 48
1
2 3
8 9