Questions tagged [nstableviewcell]

120 questions
17
votes
4 answers

Custom NSTableCellView labels not changing text color when selected

I have a custom NSTableCellView with 3 textfields, 1 that came along and 2 others that i created myself. Here's the problem: The textfields' text color stays the same even when i click on the row. I've tried to implement a code i found out by…
Pedro Vieira
  • 3,330
  • 3
  • 41
  • 76
16
votes
5 answers

vertically aligning text in NSTableView row

I have a small problem with NSTableView. When I am increasing height of a row in table, the text in it is aligned at top of row but I want to align it vertically centered! Can anyone suggest me any way to do it ?? Thanks, Miraaj
Devarshi
  • 16,440
  • 13
  • 72
  • 125
12
votes
2 answers

Print the NSTableView's row number of the row clicked by the user

I have a NSTableView with one column. I would like to print the row number of the row that the user has clicked on. I am not sure where I should start with this. Is there a method for this?
Tom Coomer
  • 6,227
  • 12
  • 45
  • 82
11
votes
4 answers

Change color of NSTableViewCell

How can I change the color of a cell in my NSTableView?
Matt S.
  • 13,305
  • 15
  • 73
  • 129
8
votes
1 answer

Vertically center NSTextFieldCell?

I have an NSTableView where I am changing the height of the rows with the following code: - (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row { return 32; } The problem is, my text cells are still being aligned to the top…
Kyle
  • 17,317
  • 32
  • 140
  • 246
6
votes
4 answers

View based NSTableView selection highlighting

I am trying to port an iOS application onto the Mac and I came across a couple of issues during the transition. One of them is the customization of NSTableView. What exactly is the difference between NSCell, NSTableRowView and custom NSView based…
the_critic
  • 12,720
  • 19
  • 67
  • 115
5
votes
1 answer

NSTableView Changing Text Color for a row

I need to change following properties for my NSTable View 1 -- Change Color:Row Color and Text Color when its selected 2 -- Change the Text Color , for each row it depends upon some input parameter, For changing textcolor for each row, i should…
Amitg2k12
  • 3,765
  • 10
  • 48
  • 97
5
votes
2 answers

NSTableView Cell with Identifier keep giving nil

I am working on building MacOS app. I am trying to make table view that updates the cell when I press add button. Following is my code: func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { let…
user3284302
  • 129
  • 1
  • 8
5
votes
2 answers

Is it possible to design NSTableView cells using Interface Builder? (not for iOS apps)

Is it possible to design NSTableView cells using Interface Builder? I know this is actually possible if your project is for iOS but somehow IB does not render the cell container if its for Mac OS X.
knoopx
  • 17,089
  • 7
  • 36
  • 41
4
votes
2 answers

NSButton in NSTableCellView: How to find desired objectValue?

I have a view-based NSTableView that is populated through bindings. My textFields & imageViews are bound to the NSTableCellView's objectValue's properties. If I want to have an edit/info button in my NSTableCellView: Who should be the target of…
4
votes
1 answer

Cocoa - View-Based NSTableView, using one cell in multiple tables

I've got a problem. [for which the only example I can find was shown during one of the WWDC 2011 presentations ("Maximising Productivity in Xcode 4"), but there is no source available (it was an app called Birdathon). Everything else I come up with…
DaveWalker
  • 521
  • 1
  • 4
  • 15
4
votes
1 answer

How do i add an accessibility label to the minus image that gets added to the tableview cell?

I am creating a tableView with custom cells, with each cell being created with the following code: UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:kEditSymbolCellId]; I have returntableView.isEditing; set. and i have the…
s5v
  • 495
  • 5
  • 20
4
votes
2 answers

Problems with NSButtonCell action

For some reason the NSButtonCell for my table view is passing the wrong object as a parameter. I am trying to read the tag of the NSButtonCell after it is clicked. Here is a simplified version of my code: - (int)numberOfRowsInTableView:(NSTableView…
4
votes
1 answer

Autolayout in an NSView being used as a cell for NSTableView

I am trying to build an NSTableView similar to how Things does it's layout. I assume what they are doing is using an NSTableView with a custom-drawn NSTableCell -- or perhaps it's an NSSegmentedControl. I am attempting to go down the NSTableCell…
XeroxDucati
  • 5,130
  • 2
  • 37
  • 66
4
votes
1 answer

NSWindow and text smoothing in NSTableView cell view

I'm writing an OS X app and have a problem with font smoothing in separate window. I have a text field where you put text and suggestion window which pops up with a list of suggestions according to what you wrote. I'm using View-cell based…
shw
  • 614
  • 6
  • 14
1
2 3 4 5 6 7 8