NSTextView vs NSTextField
NSTextView vs NSTextField
- Subject: NSTextView vs NSTextField
- From: Eric Gorr <email@hidden>
- Date: Thu, 11 Nov 2010 08:45:07 -0500
It seems to me that NSTextView can do everything that NSTextField can and more. For example, on a NSTextView, one can use the method setHorizontallyResizable: and then call sizeToFit to get it to resize itself vertically instead of horizontally.
Is this correct?
If so and if I am programmatically creating one of these controls, is there any reason why I would want to use a NSTextField?
(I know that IB uses a NSTextField for Labels, for example...is this just a historical artifact?)
If not, what are the key differences between them that would cause me to want to use a NSTextField? Would it basically come down to whether or not I need more then a single line of text or not...NSTextField seems to be optimized for single lines of text, but one can still get the same behavior out of a NSTextView with a bit more work.
Now, I know that NSTextFieldCell is commonly used as a superclass for one's own cell based stuff, but I would consider that as separate from the issue of NSTextField vs NSTextView.
Thank you.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden