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

Call a method in appDelegate from a button action connected with an nsView

Here is my problem. I have an NSTextField connected to my app delegate. Then i have a CustomView in my MainManu.xib associated with a new class i created, "myView", sublass of NSView. finally a Button that trigger an action declared in myView.h. (i…
0
votes
1 answer

How to add a Windows-like weblink in Xcode for OS X?

In Windows system, a usual web link is like a underlined, blue text. When clicking it, it will lead you to a web browser and open the website. However, I did not find a perfect way to create the same effect in Xcode. This is how I do…
Andrew Chang
  • 1,289
  • 1
  • 18
  • 38
0
votes
1 answer

Borderless NSTextField with a 6px border-bottom?

Is it somehow possible to subclass NSTextField, and add a 6px border to the bottom side only? The other sides should be borderless. No shadows, no anything. I tried replicating this with a NSView subclass 6px high instead (so 2 separate objects),…
user429620
0
votes
2 answers

NSTextField on top of custom drawing - black outline and cursor not blinking?

I'm completely stumped with this problem. I made a custom search control that uses a few different classes. For some reason, when an NSTextField is anywhere over these different pieces, it displays a solid black border around it, and the cursor…
gngrwzrd
  • 5,902
  • 4
  • 43
  • 56
0
votes
1 answer

NSStepper with decimal value

Does anybody have a workaround for using a NSStepper control (many, in fact..) with an Increment set to 0.1 or anything other than integer values w/o calling setIncrement: on each and every NSStepper instance? I've got an editor-like UI that…
Jay
  • 6,572
  • 3
  • 37
  • 65
0
votes
1 answer

NSTextField does not update calculated property using Core Data bindings

New to SO; my first question: Re: Core Data, document based app using bindings: I have an NSTableView bound to an NSArrayController, bound to an entity, LineItem, with several columns bound to the following LineItem attributes/properties: amount,…
0
votes
1 answer

NSTextField bug with FocusRingType: None

There seems to be a bug in NSTextField. When the application launches it all draws correctly. But as soon as I click in the textField the view gets all messed up. To more specific, whenever I type drawRect: gets called but with a smaller rect…
Silicone
  • 643
  • 6
  • 19
0
votes
1 answer

Keep an NSTextField (non visible) or start a new one when needed?

I have a 'canvas' view in which the user can enter a short strings at various positions. I use an NSTextField for the entry, or for editing, but when not being edited the text is just drawn in the view's draw method. Currently, I create a new…
John Velman
  • 688
  • 9
  • 16
0
votes
1 answer

NSCell title isn't updated until requested

I'm trying to implement a custom 'NSTextField' that automatically resizes itself while the user insert text. It's a simple enough task and here is the code I'm using: - (void)textDidChange:(NSNotification *)aNotification { [super…
Jacopo
  • 1,031
  • 2
  • 12
  • 25
0
votes
1 answer

Error on loading NSUserDefaults for NSTextField

I have a bunch of user defaults which I save and load on applicationWillTerminate/awakeFromNib. See below. The objects are checkboxes (NSButton), Sliders (NSSlider) and one textfield (NSTextfield). I´m on OS X. There is no problem on Checkboxes and…
Ronald Hofmann
  • 1,390
  • 2
  • 15
  • 26
0
votes
1 answer

NSTextField doesn't show when I set AttributedString placeholder

I'm trying to customize a little bit my NSTextFields and the first step is to customize the placeholder. I want to change the placeholder color, and I'm trying it out by this way: - (void)awakeFromNib { // Color for placeholder in NSTextField -…
0
votes
1 answer

How to tell which NSTextField was edited?

My NSDocument subclass adopts NSTextFieldDelegate. The document window contains several NSTextField instances (all setup as outlets of the document class). When the user edits a text field, I want my document to be notified. But all the methods in…
Nicolas Miari
  • 16,006
  • 8
  • 81
  • 189
0
votes
3 answers

NSTextField weird left margins

I've been looking for a solution for this one all day. I have 4 NSTextFields (actually subclassed for a few custom operations), which all share the same X position. The problem is, some have different styles (light, regular, bold) and might have…
Andre
  • 4,417
  • 8
  • 32
  • 37
0
votes
1 answer

How can I link and update multiple NSSliders?

I have 3 NSSliders and NSTextFields set with bindings. Each slider represents an NSInteger value, one column is low, one column is medium and one column is high. I've set Low's max to 98, Medium's max to 99, and High's max to 100. The range of…
aroooo
  • 4,726
  • 8
  • 47
  • 81
0
votes
1 answer

Is there a way to use bindings with an editable NSSecureTextFieldCell in an NSTableView?

I have an NSTableView with several columns, one of which is set up to use an NSSecureTextFieldCell as its dataCell. I am using a properly configured NSArrayController to provide data to this table. The problem is that my secure text field does not…
e.James
  • 116,942
  • 41
  • 177
  • 214