Questions tagged [nstextfieldcell]
94 questions
2
votes
1 answer
Custom NSTextFieldCell draws text differently
I have view-based NSTableView with 2 text columns.
First column uses custom NSTextFieldCell. Second column uses the default cell.
Here's the custom cell code:
class CustomTextFieldCell: NSTextFieldCell {
// don't do anything, just call the super…

Dan Pristupov
- 51
- 1
- 8
2
votes
2 answers
Copying NSTextFieldCell subclass in Swift causes crash
I have been trying to create a subclass of NSTextFieldCell to use with a custom NSTextField (with Swift). However, my code breaks when trying to copy the subclassed cell. The basic code I have is
class XYTextFieldCell: NSTextFieldCell {
var…

georgemp
- 716
- 10
- 21
2
votes
2 answers
NSTextField word wrap
I have NSTextField containing a long string, I would like the string to be split in several lines.
But now if I limit the length of the view I see the string clipped.
I have tried also to use cell's setWraps method and…

RuLoViC
- 825
- 7
- 23
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
How do I turn off bullets in NSSecureTextField?
I have a password dialog that uses NSSecureTextField and I want to include a "Show password" checkbox so I can show the password being typed in clear text.
Copying works for the case of going from the secure field to the unsecure field, but going…

Mike
- 21
- 2
2
votes
1 answer
Why does NSSecureTextField NOT support strings in some languages?
I have noticed that I cannot enter Russian or Arabic text in NSSecureTextField.
If my keyboard is set to Russian, for example, as soon as I click on NSSecureTextField, my keyboard automatically changes to English which then reverts back to Russian…

Andrew-Dufresne
- 5,464
- 7
- 46
- 68
2
votes
0 answers
How to create NSbutton inside an NSTextfield
In my application I need to show one label which showing the content and in the end of the label i need to show one button with close icon that will perform some action.
Can any one suggest way how to do this.

bhavesh
- 151
- 1
- 4
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
2
votes
1 answer
Can't change color of column that i subclass it
I subclass my table's column to NStextFieldCell. When I want to change column's color with below given code, color doesn't change. Why?
- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn…
user437064
1
vote
1 answer
Hyperlinks in an view-based TableView (NSTableCellView)
I have an view-based TableView with an image and a NSTextField. I've got some links inside my NSTextField and I have tried many options (http://developer.apple.com/library/mac/#qa/qa2006/qa1487.html, dsclickableurltextfield) but nothing works out,…

Mceee
- 33
- 4
1
vote
1 answer
NSTableView + NSTextFieldCell dynamic row size
I want to display a string inside a tableview that can be ( max ) 4000 characters long. I have tried using NSAttributedString to find out the row height for the NSTextFieldCell, but I always fall a bit short when I insert > 4 lines of text.
The…

Antwan van Houdt
- 6,989
- 1
- 29
- 52
1
vote
1 answer
setScrollable not working for NSTextFieldCell
I want my each table cell to be scrollable since its editable.I am using
self.nsChildTextFieldObj = [[NSTextFieldCell alloc] init];
[self.nsChildTextFieldObj setControlView:self.controlView];
[self.nsChildTextFieldObj…

Swastik
- 2,415
- 2
- 31
- 61
1
vote
2 answers
Changing NSTextFieldCell background color on selection
I'm trying to change the background color of a NSTextFieldCell when the cell is selected.
This is the code:
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
[super drawWithFrame:cellFrame inView:controlView];
if([self…

Donovan
- 6,002
- 5
- 41
- 55
1
vote
0 answers
How to detect text in NSTableview?
I am trying to find out how to detect text in NSTableView. There are many ways to do it and I have tried it all without success. I am using macOS 10.13 and swift 4 and I am new to swift coding.
I want to detect text in targetInput and then use the…

Aloha
- 35
- 1
- 6
1
vote
1 answer
Focus Ring in field editor for NSTextFieldCell in an NSTableView
I have a cell-based NSTableView with a text cell in a particular column. I want to provide a custom field editor so that I can do auto completion without the user pressing F5.
@implementation AutoCompleteFieldEditorTextView
-(id)init
{
self =…

Trygve
- 1,317
- 10
- 27