Questions tagged [nstablecolumn]

The NSTableColumn class stores the display characteristics and attribute identifier for a column in an NSTableView instance.

The NSTableColumn class stores the display characteristics and attribute identifier for a column in an NSTableView instance.

More: NSTableColumn Class Reference

82 questions
1
vote
2 answers

Code equivalent for size property in Interface Builder

I'm creating some NSTableColumns dynamically and they appear too tall in the table. In the Interface Builder there is a general setting to adjust the object size (mini, small, regular). Is there any code equivalent for this or should I simply select…
mkko
  • 4,262
  • 3
  • 25
  • 29
1
vote
1 answer

Limiting the text length in a cell in NSTableView column

I have a NSTableView with 2 columns. I do have code to enter text in the cells for each row. Is there a way to limit the number of characters entry in the cell say max upto 10?
Subrat
  • 175
  • 3
  • 13
1
vote
1 answer

Is it possible to programmatically bind two key paths setting continuous updates in Cocoa?

In a macOS Cocoa Application if I have two NSSlider objects, I can set the following binding programmatically: @IBOutlet weak var firstSlider: NSSlider! @IBOutlet weak var secondSlider: NSSlider! func applicationDidFinishLaunching(_ aNotification:…
Alfonso Tesauro
  • 1,730
  • 13
  • 21
1
vote
1 answer

Getting checkboxes to reflect their state in an NSTableColumn

I'm making this program that has an NSTableView with four columns, two of which are make of checkboxes. I'm only trying to get one working right now and I've gotten stuck. First, here's my relevant code: -…
1
vote
1 answer

Trying to use NSTableView

I'm an iOS dev and I'm creating my first Mac app. Running into some difficulties when trying to use NSTableView. extension HomeViewController:NSTableViewDataSource{ func numberOfRows(in tableView: NSTableView) -> Int { …
Rutger Huijsmans
  • 2,330
  • 2
  • 30
  • 67
1
vote
1 answer

NSTableColumn binding using Collection Operators like @sum

Mac OS X. CoreData app. NSTableView controlled by NSArrayController bound to managed object context for the Country entity. The Country entity has a 'name' attribute and a to-many relationship, 'branches', to a Branch entity. The Branch entity has a…
jfewtr
  • 155
  • 1
  • 10
1
vote
1 answer

NSTableView: Floating (or fixed) columns

What I would like to achieve is something like this: DevExpress Grid Table with fixed columns The table at the above links can have "fixed" columns, which does not scroll with the other content. I'm aware of NSTableView's floatsGroupRows feature,…
nvirth
  • 1,599
  • 1
  • 13
  • 21
1
vote
1 answer

How to set the width of an NSTableColumn in Swift

I'd like to programmatically set the width of some NSTableColumns in code (so that I can restore the widths on startup), but I don't really know how to apply what's written in the docs for column in table.tableColumns { var w: CGFloat = 125 …
Marc Fearby
  • 1,305
  • 1
  • 13
  • 28
1
vote
1 answer

NSTableColumn identifier is "_NS:9"

I'm trying to implement a NSTableView. I added some columns from xib, and on some of them i added a identifier. But when running the app, on -(id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn…
Alin
  • 101
  • 1
  • 9
1
vote
1 answer

How to get NSFormatter subclass to work with NSTableColumn sort key and selector?

My setup: I have a sqlite database from which I populate a NSMutableArray of NSDictionary objects this is the DataSource for my NSTableView. One of the columns holds "time", the time is a float that holds seconds. I would like to display the…
Andrew
  • 567
  • 2
  • 5
  • 18
1
vote
1 answer

Binding to NSTextField Cell not working, edited value resets to default

I'm working on a Core Data document application that dynamically creates NSTableColumns. The data cell type may be a checkbox, slider, etc. Programmatically binding to all cell types works, except for NSTextFieldCell. All NSTextFieldCells fail to…
1
vote
0 answers

Different cells in NSTableView together with bindings

im working on a nstableview that contains information for some properties that are dynamicly created. Each row contains some cells that are common (name for example), but in one column they have different cells. Some properties will have…
Jonas Jongejan
  • 2,826
  • 1
  • 16
  • 17
1
vote
1 answer

Change background of NSCell without changing all cells in the NSTableColumn

I'm trying to change the background of a specific cell in a cell-based NSTableView. However, when I try to change the background color of just one cell, it affects the entire column. Is there a way to separate whatever binding there must be between…
1
vote
2 answers

How to auto resize table column when double clicking on Cocoa?

I want to auto resize table column to its content width when double clicking its header (resize cursor is showing), like on iTunes. Anyone know how to do it ? Thanks in advance
Irwan
  • 783
  • 1
  • 13
  • 28
1
vote
1 answer

nstableview + cannot show partial file names

I am using Table View Control. In the control, I show File/Folders details, if I reduce the size of file/folder name column, it does not show partial file/folder name (whatever characters can be shown in the Column). If a file name has multiple…
King
  • 239
  • 3
  • 17