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

NSTextField Overwrite Mode

Is there a way to create a NSTextField where the input of the user replaces the text under the cursor? And in addition: is there a way to change the cursor to a block cursor?
Johann Horvat
  • 1,285
  • 1
  • 14
  • 18
0
votes
1 answer

NSTextField losing Focus/FirstResponder when mouse leaves NSWindow

I have a NSTextField in an NSWindow, when I highlight the text to change it, the highlight is blue. If, while the TextField still has focus, I move my mouse outside of the NSWindow; my NSTextField loses focus and the highlight is now gray. I…
A O
  • 5,516
  • 3
  • 33
  • 68
0
votes
1 answer

Custom NSTextFieldCell and background drawing

I created a custom NSTextFieldCell and overwrote - (void)drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView *)controlView to do my own drawing here. However, I have trouble with background drawing. Without calling super the background is not…
Mike Lischke
  • 48,925
  • 16
  • 119
  • 181
0
votes
1 answer

get current first responder from NSTextField elements

Im developing an app for MacOSX in Xcode 5 I have a group of NSTextField which share the focus by pressing TAB or Enter key, when I go to last element I send the focus to my NSWindow by pressing tab as well, the thing is... I want to go to first…
Jesus
  • 8,456
  • 4
  • 28
  • 40
0
votes
0 answers

Strange NStextfield drawing behaviour

I'm using NSTextField in OSX, why text fields used are inconsistent, Some of them are rectangle perfectly while some of them have corner ? Please see attached screenshot. I want it to be all square perfectly. I've already checked in IB they seems…
0
votes
1 answer

Preventing an NSTextField from becoming active (Cocoa OSX)

I want my NSTextFields in my GUI to act like the text fields in the apple finder (the text only becomes active for editing if the text is clicked on when the item is selected). I tried overwriting the mousedown method of the NSTextField to prevent…
Mike2012
  • 7,629
  • 15
  • 84
  • 135
0
votes
1 answer

Undefined symbols for architecture x86_64: CAMediaTimingFunction

I am currently having trouble with creating an animated NSTextField sub-classes. #import #import "QuartzCore/CAMediaTimingFunction.h" #import "CMFadingTextField.h" @implementation…
user1927638
  • 1,133
  • 20
  • 42
0
votes
2 answers

Accessing views from within NSTextField Category?

I've got several different classes in my code utilising identical methods -- resulting in a lot of duplicated lines -- and I recently found out about adding Categories which promises an effective solution to the problem. To give one of the smaller…
Bender
  • 357
  • 5
  • 15
0
votes
3 answers

NSTextField + NSTimer

I'm looking for a way to display strings at intervals in an NSTextField while my application is idle. I know of one way to do this using sleep although I don't think it's the best way to handle this. I'm thinking NSTimer…
ctfd
  • 338
  • 3
  • 14
0
votes
1 answer

Implementing action on moveUp in NSTextField

So I've just started with some mac developing. My first project is to develop a text based calculator which only consist of two components, one NSTextField and one NSTextView. The TextField takes user input and display the answer in the TextView.…
CiN
  • 1
0
votes
1 answer

Why does Xamarin.Mac window abruptly disappear?

I recently posted about a bug in MonoMac in which the window would abruptly disappear after clicking on a button 20 times or so. That bug, it turned out, doesn't seem to affect Xamarin.Mac, so I switched my project to that. But now I'm seeing…
Joe Strout
  • 2,634
  • 2
  • 28
  • 39
0
votes
4 answers

Restricting NSTextField input to alpha-numeric

I'm making a simple app in which there is an NSTextField and I want only alpha-numeric characters in it while typing. Can anyone suggest an approach to this please?
JNX
  • 29
  • 2
0
votes
1 answer

looking for a better way to activate and deactive background of text fields in my GUI (Cocoa OSX)

I have a small gui app that consists selectable groups, each groups has a disclosure button to display its sub-group, an image and a text field. When you are editting a text field and select another group or another text field I want to end…
Mike2012
  • 7,629
  • 15
  • 84
  • 135
0
votes
0 answers

How to update label (NSTextfield) without IBAction?

I’m trying to implement а simple mechanic: after draging а file, pass it’s name to lable. But I couldn’t understand how to do this. Here is my code: H file: #import @interface DropView : NSView {} …
0
votes
2 answers

NSTextField not updating in setStringValue

I have an NSTextField that displays status info as needed. It works, sort of... The problem is that it only displays the last very last updatedString and none before it in the NSTextField. When checking NSLog all of the strings appear. Is…
ctfd
  • 338
  • 3
  • 14