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

How save user login and password in app

I am new to objective-c. I've already made authorization window, using AFNetworking sent a POST request to the server. How can I make saving the login and password if the user wants. What would you every time a program is loaded, the user needs to…
Sp1DeR
  • 29
  • 6
0
votes
1 answer

Changing title, value not working in nsbutton, nstextfield

I have a window which contains two nsbutton and a nstextfield(label). In windowcontroller implementation class windowdidload inside I have set button title using setTitle and set label string value using setStringvalue. I have try to modify button…
0
votes
2 answers

Objective-C, auto erase NSTextField string

I've been trying to figure out how to auto erase a string within an NSTextField upon clicking within in it. For example the current behavior is like this on OSX: When a user clicks in the cell or the default focus is the cell either the word is…
Joe Habadas
  • 628
  • 8
  • 21
0
votes
2 answers

How do I check if there is a selection?

I have a NSTextView and I need to check if there is a selection, (blue highlight) of a word (or anything really), and not just a cursor. How can I do this. nil doesn't work, and I can't figure it out.
user4485175
0
votes
1 answer

Automatically resizing labels

I am trying to create an interface where two labels share a space, similar to an html table with two columns would: there is a distance between the two and when the window is resized they both resize and stay the same size, keeping the distance…
Samuel
  • 18,286
  • 18
  • 52
  • 88
0
votes
2 answers

cocoa osx add nstextfields programmatically

I'm making a project for osx and I need to add multiple NSTextfields to a custom view (NSView) programmatically. I don't know how to achieve this correctly. This is what I need to do: I know how to create the NSTextfiedls and how to add them to the…
user3065901
  • 4,678
  • 11
  • 30
  • 52
0
votes
1 answer

Use a text field to set the value of a variable

I have a few NSTextFields in my XIB. I created the action for one of my text fields, and it looks like - (IBAction)setXPos:(id)sender; In my AppDelegate.h file, I also created an int named XPos. In my AppDelegate.m file, I am having trouble…
XtremeHek3r
  • 381
  • 2
  • 16
0
votes
1 answer

Cocoa NSTextField - binding and setting attributes

I've got a xib with a Label (TheLabel)... which is an NSTextField. It's text is not editable by the user. I have it's value bound to an NSString* in my controller class. I have it's font bound to a NSFont* in my controller class. I can change…
BuzzB
  • 11
  • 1
  • 4
0
votes
1 answer

How To Force A NSTextField Label To Refresh

What I'm trying to do seem simple but the implementation is throwing me. How can I force a label to refresh after I change it's value? I've just created a simple progress window. As the main app is doing something I pop up the progress window and…
C4W
  • 239
  • 4
  • 13
0
votes
1 answer

NSDatePicker vs. NSTextField border/bezel

I'm trying to make a textual NSDatePicker object look exactly like a NSTextField. If I take the standard objects it looks like this: The only way I seem to find is making both objects bordered which looks like this: Does anyone know how to make…
Daniel
  • 436
  • 3
  • 14
0
votes
0 answers

NSTextField Key Interface Control (KIC) behaviour

Background: I have a custom derivation of NSTextField that I am trying to use as a cell in a grid similar to a spreadsheet. I have set the nextKeyView of my NSTextField and am confused between two states that the NSTextField can have BOTH of which…
Sam
  • 2,745
  • 3
  • 20
  • 42
0
votes
0 answers

Focus next NSTextField when tabing custom NSButton

I have "next" and "previous" NSButton in view. When i click next button it will goes and focus(editable mode) next NSTextField and when i click "previous" button it will focus previous NSTextfield. I have more than 25 to 30 NSTextField one by one.…
prabakaran iOS
  • 681
  • 7
  • 19
0
votes
1 answer

setStringValue in NSTextField will always change height

I have a NSTextField in a view where layout is totally controlled by constraints and translatesAutoresizingMaskIntoConstraints is NO. I tried to use setStringValue to change the content like this: [[self textfield]…
user4187988
  • 55
  • 1
  • 4
0
votes
1 answer

Trying to set `setNextKeyView` on `NSTextField`s in code

I am having difficulties with setting a tab-order for my NSTextFields. In my AppDelegate I add a NSViewController - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { CustomViewController *vc = [[CustomViewController alloc]…
Joseph
  • 9,171
  • 8
  • 41
  • 67
0
votes
1 answer

Resizing & Layout: How to implement this design?

OK, this might seem very simple but I've been struggling for too long, so I decided to ask for some help. Basical, I've got a container NSView. The contents are (from left to right): an NSSegmentedControl an NSTextField an NSSegmentedControl And…
Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223