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

Autolayout on a sub view prevents the whole window from being resized

I have a simple view with a few labels, textfields and a big NSTextField that spans across the remaining interface. I can setup auto layout so that the text field spans over the width of the window, but as soon as I add the last contraint Bottom…
Besi
  • 22,579
  • 24
  • 131
  • 223
0
votes
2 answers

NSControlls embedded in NSView do not show tooltips

I have multiple NSTextFields and other controls embedded in custom views: Custom View - Image View - Custom View -- Text Field -- Text Field . . . - Custom View -- Text Field -- Text Field . . . NSTextFields have assigned tooltips. These tooltips…
0
votes
1 answer

NSTextField Drawing on Top of Sub View

I have created a secondary NSViewController to create a progress indicator "popup". The reason for this is that the software has to interact with some hardware and some of the functions take the device a few seconds to respond. So being thoughtful…
David Nelson
  • 752
  • 1
  • 10
  • 27
0
votes
1 answer

NSTextView stops being able to scroll once new text is set

I have a TextView made in the Interface Builder; It scrolls fine with its default text, but as soon as I programatically set the text to something else, it no longer scrolls. I do not disable scrolling, and I have tried enabling scrolling…
narco
  • 830
  • 8
  • 21
0
votes
2 answers

Aligning NSTextField and an Image

I am trying to align an NSTextField and an NSImageView.. My current code is below. I have tried a bunch of different approaches including subclassing NSTextFieldCell (found here on SO), messing around with the frame of the text field, and tweaking…
XeroxDucati
  • 5,130
  • 2
  • 37
  • 66
0
votes
1 answer

Change NSTexfield focus by pressing Enter key

In my OS X App, how can I change the NSTextField focus by pressing the Enter key instead of pressing the Tab key?
Max Colla
  • 61
  • 4
0
votes
1 answer

NSTextField rec'd focus?

How can I know when an NSTextField has rec'd focus? Is there a delegate method that will tell me when the user has clicked the mouse in (or otherwise selected) my NSTextField? thanks tom
TomH
  • 2,950
  • 2
  • 26
  • 49
0
votes
2 answers

Cocoa NSTextField

i have a problem with accessing value from the NSTExtField in different class here is the code: AppDelegate.h #import @interface AppDelegate : NSObject @property (assign) IBOutlet NSWindow *window; …
0
votes
1 answer

VoiceOver announcing text change OS X

I have a non-editable text view (I can make it a text field, it doesn't matter). I change it programmatically when a user presses a button. I want VoiceOver to announce the change without moving the cursor. So the VO cursor stays on the…
0
votes
1 answer

NSTextField not enabled when in NSPopover from NSStatusItem

This question is answered Not being able to edit NSTextField on NSPopover even though Editable behavior is set, but because StackOverflow doesn't allow you to comment unless you have a certain reputation I'm having to create another thread. I did…
Stephen Donnell
  • 810
  • 9
  • 20
0
votes
0 answers

NSTextField Text Not Changing

I've found a few solutions to others problems around here and elsewhere via Google but no luck with their solutions. I have a class which controls most of the logic of my flashcard program, and another which controls the view with setters and…
Dr Ken Reid
  • 577
  • 4
  • 22
0
votes
2 answers

NSTextField Subclass textDidEndEditing: Deleting Text

I have an NSTextFeild Subclass in which I would like to implement textDidEndEditing: to check after each edit if it is empty or not. The method is being called perfectly, but when I click into another NSTextField (or a subclass), all the text that…
Matt Cooper
  • 2,042
  • 27
  • 43
0
votes
1 answer

Changing the Value of NSTextField doesn't update label?

I'm trying to change a label from the AppDelegate. I can change the label with an IBAction that runs a changeLabel in the implementation of the class that has the label, but if I try to run changeLabel from the AppDelegate it changes the value (I…
CharlesL
  • 265
  • 5
  • 21
0
votes
2 answers

cocoa detect text changed

I just started OS X development with Cocoa, but I got many basic problems. How can I detect text changed from NSTextField something like onTextChanged() in Java? Someone said that make delegate, but I can't understand what is delegate, and what it…
Alfred Woo
  • 648
  • 1
  • 6
  • 23
0
votes
2 answers

Changing text field repeatedly in a loop only displays one final value

I wish to create a loop that increments an integer every ten seconds, and does this one hundred times. But when I use this code: - (IBAction)loopTest:(id)sender { } - (IBAction)beginLoop:(id)sender { for (i=0;i<100 ;i++ ) { testingLoops++; …