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
2
votes
2 answers

Binding single NSCell to multiple values

I've already killed a day on this subject and still got no idea on how could this be done in a correct way. I'm using NSOutlineView to display filesystem hierarchy. For each row in the first column I need to display checkbox, associated icon and…
mike.dld
  • 2,929
  • 20
  • 21
2
votes
2 answers

Hiding the lupe icon of a NSSearchField

I’m using a NSSearchField (not subclassed). When it’s not focused, the placeholderString is centered. But the lupe icon on the left appears a bit offset, so in fact the whole thing appears not to be centered. Is it possible to hide the lupe icon?
ixany
  • 5,433
  • 9
  • 41
  • 65
2
votes
0 answers

Scrolling is slow with Cell based NSTableView

I have set up a simple NSTableView with 10 columns that display only text. I have exactly 500 records. I have tried both using CocoaBindings and NSTableViewDataSource and in both cases, the scroll is slow when I scroll quickly up or down. I'm…
yageek
  • 4,115
  • 3
  • 30
  • 48
2
votes
1 answer

Problem retrieving NSCell data via [NSTableColumn dataCellForRow]

I am trying to retrieve a specific NSCell data from an NSTableView through [NSTableColumn dataCellForRow] but every time it shows different value for same row and same column. The data source remains the same at all time. The NSTableView is bound to…
Omayr
  • 1,949
  • 4
  • 22
  • 35
2
votes
1 answer

How to set value of NSComboBox by KVC?

I have several NSComboBoxes created in Interface Builder, and one created programmatically. The NSComboBoxes created in Interface Builder are perfect. I have their Value bound to the Shared User Default Controller, and when their view is opened…
Dennis
  • 1,215
  • 1
  • 12
  • 15
2
votes
1 answer

Swift 1.2 Why cannot I subclass any NSCell's subclass?

Why can't I subclass any subclasses of NSCell? I would like to subclass MyButtonCell, which is CustomButtonCell: NSButtonCell. Meaning class MyCustomButtonCell: MyButtonCell { } always gives me the following errors: :0: error:…
Q8i
  • 1,767
  • 17
  • 25
2
votes
1 answer

NSTextFieldCell or just NSCell with vertical text (and colored tinting)

I'm struggling with trying to find an elegant way of displaying the column headers for a table view in a vertical fashion (rotated 90 deg counter clockwise from traditional). I'm not married to doing this as an actual NSTableHeaderCell, I figured…
Greg Combs
  • 4,252
  • 3
  • 33
  • 47
2
votes
1 answer

Get NSImage from NSTextField in Swift

I used to retrieve the NSImage in a subclass of NSTextField from Obj-C like this: NSDictionary *attributedVal = [[self attributedStringValue] attributesAtIndex:i effectiveRange:&effectiveRange]; if ([[attributedVal allKeys]…
qwerty_so
  • 35,448
  • 8
  • 62
  • 86
2
votes
1 answer

Draw shadow under NSImage

Currently I'm drawing an NSImage in a custom NSCell like so: - (void)drawInteriorWithFrame:(NSRect)theCellFrame inView:(NSView *)theControlView { // roundedCornerImage creates a new NSImage with rounded corners, rather than clipping. …
Tom Irving
  • 10,041
  • 6
  • 47
  • 63
2
votes
2 answers

Custom NSCell in NStableColumn and Cocoa Bindings?

I'm currently trying to use Cocoa Bindings to populate a NSTableView using Cocoa Bindings. I encounter a major problem with some columns where I use custom NSCell subclass. My XIB file contains a NStableView and a NSArrayController. In interface…
yageek
  • 4,115
  • 3
  • 30
  • 48
2
votes
1 answer

What method should I call on my NSCell

I am writing a custom NSControl with custom NSCells. It is a control, so it has to respond to the mouse. I created an NSTrackingArea over my control, implemented -mouseEntered:, -mouseExited: and -mouseMoved:. (And I will have to implement…
11684
  • 7,356
  • 12
  • 48
  • 71
2
votes
1 answer

Cocoa: custom NSCell not respond double click action

I focus on a cocoa app supported on 10.6, and I use cell-based NSTableView. I custom the NSCell so that it can display image and text. The Problem here is : when I set the doubleClickAction to the tableview, it did not respond. I have already found…
scorpiozj
  • 2,687
  • 5
  • 34
  • 60
2
votes
2 answers

NSCell redrawing issues

I'm creating a NSCell subclass that draws some objects directly onto the view (using drawInRect:fromRect:operation:fraction:respectFlipped:hints:) and also draws an NSButton instance simply using NSView's addSubview: selector. While objects drawn…
Pripyat
  • 2,937
  • 2
  • 35
  • 69
2
votes
0 answers

Changing background color in an NSCell cell not using NSTextFieldCell

At the Moment in my table i have four columns. Three are NSTextFieldCells and one is a custom cell using NSCell. I need to change the color of a row. I've changed color of the NSTextFieldCells but now i need to change the NSCell background color, is…
Alioo
  • 417
  • 1
  • 4
  • 19
1
vote
1 answer

How can I change individual cell background colors in an NSForm?

I would like to individually set cell background colors in an NSForm. I thought it would be a matter of subclassing NSForm and overriding -drawCellAtRow:column:. But -drawCellAtRow:column: only gets called when the cell receives focus. I've…
SSteve
  • 10,550
  • 5
  • 46
  • 72