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
1
vote
1 answer

NSButton gets drawn inside custom NSCell, but is not actually clickable

I have a NSTableView which contains my custom NSCell subclass, IconCell. The IconCell contains three elements : an image, text, and a button. Here's a simplified version of my drawing code (closeButton is the button): -…
houbysoft
  • 32,532
  • 24
  • 103
  • 156
1
vote
1 answer

Change direction of disclosure triangle

How can I change the direction of the disclosure triangle programmatically? In Interface Builder it's possible by changing the value "Control -> Layout" from "Left to Right" or "Right to Left". I made a diff of a NIB file. The only change was…
Razer
  • 7,843
  • 16
  • 55
  • 103
1
vote
1 answer

Retrieving cell contents from NSOutlineView

I have an odd issue cropping up with an NSOutlineView. The view is essentially a list of apps with associated files as children. I populate the view by hand in it's data source and all of that works fine. What I now want to do is have a button to…
VsSoft
  • 288
  • 1
  • 11
1
vote
2 answers

NSCell with divisions

I want to know if there is a way of drawing an NSCell like the following sample. The idea is to fit in the same column, 3 rows, the first one with enough space for a Title, and the rest with 2…
mikywan
  • 1,495
  • 1
  • 19
  • 38
1
vote
0 answers

NSSliderCell and NSButtonCell won't change values

I have an NSTableView with an NSTableColumn whose value is bound to that of an NSArrayController. I am using a delegate to give which rows have which cell types. When, in the .nib file, the column's cell is an NSTextFieldCell, then the NSSliderCell…
Maz
  • 3,375
  • 1
  • 22
  • 27
1
vote
1 answer

Core Animation causing partial Source List focus ring

I'm using a slightly modified ImageAndTextCell from one of Apple's tutorials in a custom NSOutlineView. For those unfamiliar with it, it's an NSTextFieldCell subclass that draws an image to the left of the cell's text. I have a Source List like…
Dov
  • 15,530
  • 13
  • 76
  • 177
1
vote
1 answer

Updating Core Data from custom NSCell

I have a custom NSCell (actually subclassing NSTextFieldCell), which is used both in a standalone editor, and in an NSTableColumn (bound to Core Data through NSArrayController). When the user changes the value, I call -[NSCell setObjectValue:] to…
Dov
  • 15,530
  • 13
  • 76
  • 177
1
vote
2 answers

NSTableView with more than one UI element in NSCell (like Transmission)

How would I make an NSCell with more than one UI element in it and display it in an NSTableView? For NSCells with a single value I could implement tableView:objectValueForTableColumn:row: but I don't know how to do this for NSCells with more than…
Jibo
  • 13
  • 2
1
vote
0 answers

NSCell won't remove from NSTableView

I have an NSTableView filled with custom NSCells. Most include text, but one contains an NSButton. When I reduce the amount of objects in my data source, call -noteNumberOfRowsChanged and -reloadData, all the NSCells with text disappear, but the one…
Ricky
  • 3,101
  • 1
  • 25
  • 33
1
vote
1 answer

How to track mouseover in a cell of NSMatrix?

I would like to track a mouseover event of a NSCell in a NSMatrix. The documents say I can set the NSMatrix mode to NSTrackModeMatrix and the cell will be sent the message trackMouse:inRect:ofView:untilMouseUp: when the mouse is within the bounds of…
David
  • 14,205
  • 20
  • 97
  • 144
1
vote
1 answer

How can i show an NSImage in front of a NSTextFieldCell in a NSTableView

I display a file list and want to show the file icon and editable file name in a NSTableColumn. Also what would be the best way to display an additional NSImage immediately behind the file name (i mean not adding an additional column at the right…
Lothar
  • 12,537
  • 6
  • 72
  • 121
1
vote
1 answer

Passing array of custom objects to NSCell in NSMatrix programmatically

I have an NSArray of custom NSObjects. Each object has some properties and an image that I would like to display in a grid view. NSMatrix appears to be a good solution to my problem, but I am having issues getting the content of the objects to…
Hooligancat
  • 3,588
  • 1
  • 37
  • 55
1
vote
0 answers

Custom NSControl

I'm trying to create my own NSControl by creating xib file and associate it with its .h and .m files My control is a subclass of NSControl and it contains NSStepper and NSTextfield, the reason I use the NSControl superclass is that I want my control…
Mark S
  • 235
  • 3
  • 11
1
vote
3 answers

Getting Custom NSCell with NSButtonCell instance to handle mouse click/mouse events

OK I'm really stumped on this one. I want to make a checkbox with a NSTextFieldCell combined together. It's important that the checkbox goes ON if the mouse hits the box, NOT the text. I've accomplished this, more or less, but the issue is receiving…
maz
  • 8,056
  • 4
  • 26
  • 25
1
vote
1 answer

NSCell Subclassing: Draw NSProgressIndicator?

I am using a cell-based NSTableView. Is there any way to create a custom NSCell subclass and draw a NSProgressIndicator in it? Something similar to: -(void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView{ [myProgressControl…
user2354690