Questions tagged [nstextfield]

NSTextField object belongs to Apple's class. It's a kind of NSControl that displays text that the user can edit or select.

An NSTextField object is a kind of NSControl () that displays text that the user can select or edit and that sends its action message to its target when the user presses the Return key while editing.

The NSTextField () class uses the NSTextFieldCell () class to implement its user interface.

References:

1028 questions
0
votes
1 answer

cocoa: NSTextField with custom font, cursor out of wack

I have an NSTextField with a custom font set up in Interface Builder. When it loads, this is how it shows up: When the user starts typing, the cursor moves correctly And then when the user deletes the text it resets to the correct original…
cwRichardKim
  • 1,030
  • 1
  • 9
  • 15
0
votes
2 answers

Sending in values in a NSTextField: objective c

Ok, so I have an NSTextField and an NSSlider. In interface builder, I got the float value from the NSSlider to go into the NSTextField. BUT, I need a button that sends the text from the text field in so I can get the value in my code. That text…
objectiveccoder001
  • 2,981
  • 10
  • 48
  • 72
0
votes
1 answer

textDidEndEditing: Objective c example

So I know you have to put this in the .h file: - (void)textDidEndEditing:(NSNotification *)aNotification BUT what do I call in the .m file?? How do I show that text is done editing in one of several NSTextFields? I looked around on the internet,…
objectiveccoder001
  • 2,981
  • 10
  • 48
  • 72
0
votes
1 answer

getting values from NSTextField in objective c and xcode

How can I continuously get data from an NSTextField and do this in the background? I'm doing this because I'm using a quartz composer plugin to get posted values in an NSTextField. This is within the same app. Any ideas?? Elijah
0
votes
1 answer

Subclassed NSTextField generates memory warnings after user input

I have implemented a subclassed version of NSTextField, which I've called CustomTextField, the code for which is below: @interface CustomTextField : NSTextField @property (nonatomic, strong) IBInspectable NSImage…
narner
  • 2,908
  • 3
  • 26
  • 63
0
votes
1 answer

How can I make a NSTableCellView editable after a doubleclick?

SETUP: I created a NSTableView, which has a normal NSTableCellView, in Storyboard. Now I click on the textfield within the NSTableCellView and select Editable as Behavior. Build & Launch. RESULT: When you click on a cell, it becomes highlighted, if…
Mark
  • 16,906
  • 20
  • 84
  • 117
0
votes
1 answer

How can you change the highlight color of a NSTextField within a NSTableCellView?

In storyboard when I set the Text Color of a NSTextField within a NSTableCellView to Control Text Color the color becomes black and when the cell is selected/highlighted it will become white. When you deselect the color will return to black. You get…
Mark
  • 16,906
  • 20
  • 84
  • 117
0
votes
1 answer

how to show avg of employees salary in a NSTextField using NSArrayController and cocoa bindings

I am new to cocoa bindings so I tried to make a simple application which will simply calculate avg of employees salary and display it in a text field, using cocoa bindings. I followed these steps: Made the model class : Person with one property for…
Devarshi
  • 16,440
  • 13
  • 72
  • 125
0
votes
0 answers

Taking a string value from a NSTextField in Swift

Say a user enters some text hey into a NSTextField. I would like to extract this text to a NSString, but for some reason, I can't. I've been trying to find the answer to this question and I've seen many answers on this website saying that you can…
perhapsmaybeharry
  • 874
  • 3
  • 13
  • 32
0
votes
2 answers

NSTextField - actions within *textField

I need help using NSTextField and its inputs/outputs. In a functioning code I have three different NSTextFields (in Cocoa + Obj-C) I know how calculate result from more integer inputs... --- AppController.h --- @interface AppController : NSObject…
Hancz
  • 65
  • 9
0
votes
1 answer

Recognize which of NSTextFields is editing now swift

I have to write a program that navigates between multiple NSTextFields (that I store in the array) with keyboard arrows and I need to recognize, which of many NSTextFields user is editing at the moment of test. Is there any way to do that in swift?
pomo_mondreganto
  • 2,028
  • 2
  • 28
  • 56
0
votes
1 answer

Cocoa NSTextField NSNumberFormatter and delegate

I'm making a NSTextField that has the following characteristics: 1) allows integer values only (0-9) 2) is 1 or 2 digits long 3) min of 1, max of 99 4) if 0 is entered, the value should change back to 1 5) if delete is pressed and the cell is…
tosa
  • 411
  • 1
  • 3
  • 23
0
votes
2 answers

How to remove cursor from text field on click of button?

I am trying to do a simple task: I have an editable text field, two buttons (titles: make editable/ make un-editable) over a window. Idea is: when user clicks "make editable" button, text field should become editable and when he/she clicks "make…
Devarshi
  • 16,440
  • 13
  • 72
  • 125
0
votes
1 answer

Undo makeFirstResponder

I want an NSTextField that prevents empty strings so I subclassed the NSTextField and implemented this method -(void) textDidEndEditing:(NSNotification *)aNotification { if([[self stringValue] isEqualToString:@""]) { NSBeep(); [[self…
stupot
  • 13
  • 3
0
votes
1 answer

Drawing fixed symbol inside NSTextField

I have a NSTextField and I would like a symbol to always appear at the far left, with the content of the text field beginning to the right of it. For example you can imagine a text field with a dollar sign ($) prefixed at the far left. One could…
Jordan H
  • 52,571
  • 37
  • 201
  • 351