Questions tagged [nscell]

The NSCell class provides a mechanism for displaying text or images in an NSView object without the overhead of a full NSView subclass. It’s used heavily by most of the NSControl classes to implement their internal workings.

The NSCell class provides a mechanism for displaying text or images in an NSView () object without the overhead of a full NSView subclass. It’s used heavily by most of the NSControl () classes to implement their internal workings.

References:

115 questions
0
votes
1 answer

NSColorPanel from NSCell

I have a custom NSCell with the following code to display an NSColorPanel when it is clicked: -(void)setColorFromPanel:(NSColorPanel*)panel{ NSLog(@"COLOR is HERE!"); [self setObjectValue:[panel color]]; } - (NSUInteger)hitTestForEvent:(NSEvent…
Maz
  • 3,375
  • 1
  • 22
  • 27
0
votes
1 answer

Transparent NSTableView

I want to customize my NSTableView. My overall requirements are like this: Each row will have one image and some text; images and text could be different. Some cells might not have an image. Row height is dependent upon some external factor. A cell…
Amitg2k12
  • 3,765
  • 10
  • 48
  • 97
0
votes
2 answers

How can I display an Image in an NSTableView?

I have an NSTableView that is populating with my data source. My data model has a URL to an image. I would like to display an image next to some text in every cell of my NSTableView. Basically like a twitter client, image on the left, with some…
Sheehan Alam
  • 60,111
  • 124
  • 355
  • 556
0
votes
0 answers

How to make outlineView:objectValueForTableColumn:.. accept an attributedString

I'm trying to make an outline cell display an attributed string in Bold text. This is a cell-based outline. Here is how I create the attributedString: anObject.name =[[NSMutableAttributedString alloc]initWithString:@"Draft Chapters"] …
Carl Carlson
  • 500
  • 4
  • 17
0
votes
3 answers

Tracking the position of a NSCell on change

I have a NSTableView and want to track the position of its containing NSCells when the tableView got scrolled by the user. I couldn’t find anything helpful. Would be great if someone can lead me into the right direction! EDIT: Thanks to @Ken…
ixany
  • 5,433
  • 9
  • 41
  • 65
0
votes
1 answer

Cocoa custom cell in NSTableView: NSCell subclassing leak

I made a subclass of NSCell and overrided the setObjectValue function to achieve my need.Things are fine except there is a leak problem. The setObjectValue function of NSCell seems wont release its original object. The object I give the class is a…
mr.Pony
  • 257
  • 3
  • 15
0
votes
0 answers

Unable to change NSTableHeaderCell font on El Capitan

I'm developing a Cocoa App (OSX) and, in my tableview, I want to change the font of all of my columns. I'm using the cell-based version. Strangely, It is not possible to do it by using Interface Builder (IB). Each time, it forces me to use the font…
Chrstpsln
  • 765
  • 16
  • 31
0
votes
1 answer

NSTextFieldCell's cellSizeForBounds: doesn't match wrapping behavior?

It seems to be commonly accepted that cellSizeForBounds: allows one to calculate a text field's "natural" size. However, for NSTextField, I've found that it doesn't quite match: @interface MyTextField : NSTextField @end @implementation…
jtbandes
  • 115,675
  • 35
  • 233
  • 266
0
votes
2 answers

NSCell is setEnabled:NO but is still accessablie for editing and such

I have a custom control that I use that has some (NSTextField *) NSCells in it. I have attempted at the cell level to disable all cells from usage, yet my loop that goes through all the cells seems to do nothing. [myCell setEnabled:NO]; compile and…
theprojectabot
  • 1,163
  • 12
  • 19
0
votes
1 answer

NSTableView - programatic display of values in a long table view

Ok, so I am creating an iTunes overlay for a client. My question is, with a given index, how am I able to move the displayed cells/cells in a row to a specific entry in the table view, programatically. In other words, replicating iTunes when you are…
0
votes
2 answers

Create and Respond to a Hyperlink within a NSTableView Text Cell

I have a program that has a NSTableView populated with files to be uploaded. Once the file is sent, the Text Cell with the file's name gets a hyperlink placed into it (the array data is given an NSMutableString with an NSLinkAttributeName…
P.M.
  • 436
  • 6
  • 12
0
votes
2 answers

How can I consistently get the selected cell value from a filtered NSTableView?

Context I have a 2 column, cell based NSTableView managed by an NSArrayController. The first column is populated with checkboxes to indicate whether the value is enabled. The second column represents the name of the element. The view is linked…
0
votes
1 answer

Curious about NSButtonCell state

I have a NSTableView with an NSTableColumn with an NSButtonCell (a checkbox) inside it, which generates a new instance of NSButtonCell each time a row is added, which I configured in IB. However, I'm curious why in the following chunk of code the…
PopKernel
  • 4,110
  • 5
  • 29
  • 51
0
votes
2 answers

How is NSCell displayed?

An NSControl's cell isn't in the view hierarchy. Am I correct? If it isn't, how is it being drawn on the view if it's not in the view hierarchy? I ask because I want to have a View/Control subclass that I can drag out onto a contentview, then add…
joels
  • 7,249
  • 11
  • 53
  • 94
0
votes
1 answer

Core data and custom NSCell

I am building a toy app using core data for two entities Log (attributes text and date) and Tag with a many-to-many tags relationship from Log to Tag. I want to show logs in a table, so I: created an NSArrayController instance, LogController in IB…
raheel
  • 1,407
  • 1
  • 15
  • 24