Questions tagged [nstableviewcell]
120 questions
3
votes
2 answers
Remove Outline on Right-clicked Rows in SwiftUI Mac App List
I'm building a macOS app with SwiftUI, and I'm trying to remove (or even cover up) the border added to a List item when I right-click it.
Here it is by default:
Now with a right-click and a contextMenu view modifier:
I figured this is an…

Clifton Labrum
- 13,053
- 9
- 65
- 128
3
votes
1 answer
Should I retain the returned view from makeViewWithIdentifier:owner:?
Which of the following is correct?
NSTableCellView *cell = [outlineView makeViewWithIdentifier: [tableColumn identifier] owner: self];
// Do stuff…
return cell;
or
NSTableCellView *cell = [[outlineView makeViewWithIdentifier: [tableColumn…

Constantino Tsarouhas
- 6,846
- 6
- 43
- 54
3
votes
1 answer
How to create a NSTextFieldCell, that in edit mode displays a custom view instead of NSTextField?
I have a tableView, with 3 columns containing NSTextFieldCell. Everything is populated with bindings.
The text of the cells of one of the column is computed and is not editable directly.
For this column, I would like when the cell goes into edit…

Guillaume
- 21,685
- 6
- 63
- 95
3
votes
0 answers
Create NSTableView cells without XIB or Storyboard cells
I'm using a storyboard to place my table and set constraints, but I want all of the columns to be defined via code. I have a set of like 15 columns that I always add to 6 or 7 tables, so it's much easier to just do that from code.
I can add all the…

Gargoyle
- 9,590
- 16
- 80
- 145
3
votes
0 answers
NSTableCellView inside a custom view refuses first responder
Instead of a TableView I want to use a NSTableCellView inside a custom view. So I created a xib file with a standard NSTableCellView and loaded that into a view.
The table cell view is displayed as expected. But I can't make its textfield the first…

user965972
- 2,489
- 2
- 23
- 39
3
votes
1 answer
Table view cell, custom editor and editing frame
I am using a custom editor when editing the contents of a cell inside a Table view. From the docs I see that the custom editor has to be an NSTextView. So I put the text view in the document view, then I referenced it from the cell subclass through…

Donovan
- 6,002
- 5
- 41
- 55
3
votes
6 answers
Initial size of Text Field is wrong (NSTableView)
I have a single column NSTableView (view based) with a TextField. I am using autolayout and IB. Most of the views in the window are resizable, in particular the table. I am putting attributed text in the TextField. If the application starts with…

Bill
- 1,588
- 12
- 21
3
votes
2 answers
Cocoa: Core Data + NSTableView
I have a core data app set up, and everything is working pretty well. But there is one little problem. When I insert a new object into my entity I have it go to my NSTableViewCell, where I can edit it to the text I want, but there's one little…

Matt S.
- 13,305
- 15
- 73
- 129
2
votes
1 answer
Custom Cells in an NSTableView
What's the best way to populate an NSTableView with custom cells?
I always utilize Cocoa Bindings when I'm populating standard data, and I always utilize datasources when populated tables with custom cells. What I'm wondering is if there's a way…

Anonymous
- 1,750
- 3
- 16
- 21
2
votes
1 answer
View Based Table Cells on OS X not showing data properly
So I admit to being a total noob to cocoa, so I offer a noob question. I'm probably just missing the dumb obvious somewhere but i just cant seem to get my table to populate data.
I'm following the table view playground example but everytime i try…

Jacob
- 1,052
- 8
- 10
2
votes
1 answer
Animating NSTableView with beginning and ending array states
I've been looking over NSTableView's moveRowAtIndex:toIndex method for animating rows in a table. It's not really helpful for sorting though from what I can tell. My interpretation of how it works is, if I want to move row 0 to row 4, then the…

JPC
- 8,096
- 22
- 77
- 110
2
votes
2 answers
Simulate Tab and Shift-Tab with arrow keys in NSTableView
I want to simulate tab and shift-tab with right arrow and left arrow. I suppossed I have to subclass NSTableview and overide keydown code but I don't know how to tell the table view that has to edit a cell in a column and row. this is how far i…

Javier Beltrán
- 756
- 5
- 26
2
votes
1 answer
NSTableView won't call viewForTableColumn
I am trying to build a table view without interface builder from scratch in my Cocoa app and my viewForTableColumn method refuses to get called.
My table view is created using this code.
let tableView: NSTableView = {
let table =…

afrigon
- 47
- 1
- 7
2
votes
1 answer
Cannot change the row height of TableViewCells - Swift
I am attempting to set the height of a custom tableViewCell, but the code below does not work. What is the better way to do this?
Programmatically:
override func viewDidLoad() {
super.viewDidLoad()
self.tableView.rowHeight = 140
}
via…

johnDoe
- 709
- 11
- 29
2
votes
0 answers
NSTableView set target and action cause cell problems
I want to detect click on cell in NSTableView
so I did:
tableView.target = self;
tableView.action = @selector(tableViewClicked:);
but I saw that another @IBAction's that connected to the cell does not work.
what could be the problem?
thanks

ULAQ
- 41
- 1
- 1
- 4