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
0 answers

Displaying Cocoa UIComponents without dragging from Interface Builder and making Connections

I have three(can be many) parameters and their values like : School : Bomey School Degree : MBA Profession : Student I want to display above texts as it is on a view. But suppose the profession is Lecturer, I dont want to show the line…
0
votes
1 answer

initWtihFrame: method for custom textfield not being called when created in a TableCellView

So I'm trying to create a custom NSTableView by subclassing NSTableCellView and a NSTextField inside of the cellview. I'm trying to write some init code in the initWithFrame: method for the NSTextField subclass (TableTextField), but it looks like…
Matt Cooper
  • 2,042
  • 27
  • 43
0
votes
1 answer

NSTextField will not show

I've tried many of the answers that I've found here. I must be doing something dumb and could use help. in .h: @property (strong) IBOutlet NSTextField *title; in .m: title = [[NSTextField alloc] init]; [title setStringValue:@"test"]; NSLog(@"title…
ICL1901
  • 7,632
  • 14
  • 90
  • 138
0
votes
1 answer

How to overwrite textDidChange: method correctly?

I subclassed NSTextField and overwrite the textDidChange: as: - (void)textDidChange:(NSNotification *)notification { // ... My own operation } But when I drag a input text box into my .xib file and control drag another class to assign the…
Andrew Chang
  • 1,289
  • 1
  • 18
  • 38
0
votes
1 answer

how can form a user in put with text field and without a button

i want to form a textfield in my view controller. After user make his input to this text field and press return or dismiss keyboard with touching to the screen, an action must be done. how can i implement that? i want that code to be executed for…
0
votes
6 answers

How do I combine a char with an int in an NSTextField in Objective-C?

For example, I have the following code, where lblPercent is an NSTextField: double Progress = progress( Points); [lblPercent setIntValue:(Progress)]; I set it as integer value so it tosses out the decimal, since for some reason the…
0
votes
1 answer

NSTextView inherits parents view background on update

I have a NSTextView that I am using to display a timer. This timer updates every second counting down to 00:00. When the timer updates the string for the NSTextView, the NSTextView acts as if it redraws but uses its parents views background for its…
0
votes
1 answer

NSSearchField animation

How to animate an NSSearchField like the one in Reeder for Mac : http://juliensagot.fr/upload/reederSearchAnimation.mp4 Thanks for your ideas
AP.
  • 5,205
  • 7
  • 50
  • 94
0
votes
3 answers

How to assign the value of NSTextField 1 to r NSTextField 2

Im reading a book and in the sample code they show how to assign the value of a NSTextField to another NSTextField like this: self.theStory.text = self.theTemplate.text; When I try to do the same without using Dot Notation: [[self theStory]text] =…
0
votes
1 answer

How to make NSPopUpButton accept firstResponder status?

I have an NSPopUpButton and even a simple subclass of NSPopUpButton. In the subclass I have: - (BOOL)acceptsFirstResponder { return YES; } - (BOOL)refusesFirstResponder { return NO; } Now it's easy enough to tell the window to make the button first…
uchuugaka
  • 12,679
  • 6
  • 37
  • 55
0
votes
2 answers

How to call a tagged textfield

I am creating a series of textfields programmatically using tags. I want to be able to access the data in each text field, but it keeps reverting back to the last tag. In this example I am creating 10 textfields. When you click on a field it…
Brian Slack
  • 13
  • 1
  • 5
0
votes
2 answers

Constrain two text fields to maintain an aspect ratio

I have two text fields: one for width and one for height. Let's say the starting values are 1080 by 720. If the user changes the 720 to 360 I want to automatically change the 1080 to 540. What is the best way to do that?
Anand
  • 35
  • 1
  • 8
0
votes
1 answer

The blue focus ring outside NSTextField missing?

In normal case, a blue retangle would appear outside a NSTextField object which becomes the first responder, like this image: link for Normal Case However, I got a NSTextField that have no the blue border outside. Why is that? Here is how it…
Andrew Chang
  • 1,289
  • 1
  • 18
  • 38
0
votes
2 answers

Make NSComboBox Appear when NSTextField is clicked

How can I make an NSComboBox disappear when an NSTextField is clicked? This is the code I'm using: Class comboBox: (used as custom class for my NSComboBox in the interface builder) comboBox.h: #import @interface comboBox1 :…
rambodrahmani
  • 99
  • 4
  • 12
0
votes
1 answer

NSTextField without margin?

Is there a way to have an NSTextField without any margins? I'm trying to set my textfield as wide as the text itself, but I have to add some random nr (10px) to make it all show. NSSize size = [title sizeWithAttributes:[NSDictionary…
user429620