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

Output text from NSTask to NSTextField OS X - XCode Objective -C

I was wondering how I would output text from NSTask and send it to a NSTextField on OSX.
0
votes
2 answers

How can I force NSTextField to only allow numbers?

In Interface Builder I’ve created a textfield and stuck an NSNumberFormatter into the cell. However, the user can still type text into the textfield. Is there any way to restrict the input to numbers only using interface builder? I thought that…
JPC
  • 8,096
  • 22
  • 77
  • 110
0
votes
1 answer

NSTextField auto increase width when not editable

I am making a mac osx app using Xcode/cocoa. In this app, there is a NSTextField which displays a text when a button is pressed. When the textfield is in editable behavior everything works fine, but this textfield should not be editable. The problem…
NeoRamza
  • 151
  • 1
  • 11
0
votes
1 answer

Draggable NSTextField in Cocoa

I am developing an application to print Invoices. I write the following code to make the NSTextFields Draggable and match with Invoice-fields. It Works, but when a resize the window, the NSTextField, return to initial position. What can i…
user1794362
0
votes
1 answer

Display Console output to a control in app

My Cocoa app has a debug mode that displays additional window in which I'd like to present NSLog output (just like the Console window in Xcode). I already have a custom NSlog method, which saves the output to a file as well. Which control should I…
Thunder
  • 611
  • 1
  • 8
  • 25
0
votes
1 answer

Connect an NSNumberFormatter to NSTextfield

I am trying to connect an NSNumberFormatter to an NSTextfield using the formatter outlet of an NSTextField (shown in image below). My formatter subclass is as follows: #import @interface FieldFormatter :…
wigging
  • 8,492
  • 12
  • 75
  • 117
0
votes
1 answer

cocoa - add NSTextfield to NSRect

I'm confused as to why the code below isn't working, what I would like to achieve is to have a NSTextfield in a NSRect but I'm not sure if it's possible and if it is how to do it, I tried the code below but it's not working... NSRect city_label =…
Lennart
  • 1,560
  • 5
  • 20
  • 38
0
votes
1 answer

Trouble with NSString: using a controller to set an NSTextField?

I am using Xcode 4 writing a simple program to generate text based on user input. Im reading from two text fields successfully, but I am unable to send the result to a separate NSTextField. I'm confident I've made all the right connections in IB,…
DanMoore
  • 621
  • 1
  • 8
  • 14
0
votes
2 answers

NSString input conversion objective c

Hello I would like to know how to get my NSString to to read 5.11 as 5.11 not 5.1. It is necessery that I can do this is that I am reading in from this field as feet and inches and not decimal format. This code works for the calculation …
AlanF
  • 1,591
  • 3
  • 14
  • 20
0
votes
1 answer

Click under NSTextField

I'm trying to customize a NSTableView, in order to do that, I've implemented the following method: -(NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row{ NSImageView *cellImage =…
user1573607
  • 522
  • 9
  • 23
0
votes
1 answer

Printing with NSTextfield crash

I have an app (Xcode4.5, 10.8) that works with airfoil coordinates. The airfoils show up on screen and can be printed. Now I want to add a title on the printed airfoil in the print method. I have an NSView Druckfeld to which I add the subview with…
heimi
  • 499
  • 7
  • 16
0
votes
1 answer

NSTextField validation and NSSearchField save it's value to recent history on NSButton click

I have this setup, my NSWinow has two NSSearchFileds with relative autosave search history, one NSTextField and a NSButton. NSSearchFiled has to autosave the search (wich work right when user press "Enter" key) NSTextField needs to be validated and…
Shebuka
  • 3,148
  • 1
  • 26
  • 43
0
votes
2 answers

How to resize NSTextField dynamically?

I want an NSTextField to get bigger as the user types, and smaller as backspace is pressed etc. The only thing I've found is [textField sizeToFit] but that doesn't run dynamically, it's just a one off resizing. Is there a property or something I…
Mirror318
  • 11,875
  • 14
  • 64
  • 106
0
votes
1 answer

Objective C: Display log in NSLabel or NSTextField

Is there a way to display the console log (where all the NSLogs are displayed) continuously in an NSLabel or a continuously scrolling NSTextField? There are important messages in the console I would like to print that are sent by the machine (not…
Zoltán Matók
  • 3,923
  • 2
  • 33
  • 64
0
votes
2 answers

Change NSTextField's behavior for multiple clicks in a row

I have a NSTextField which is nested by a custom view and I want to change the default behavior of multiple clicks in a row (double click, tripple click etc.), similarly to the behavior of text nodes MindNode (see the image below). I want the first…
Lukáš Kubánek
  • 946
  • 1
  • 15
  • 27