Re: NSTextView vs NSTextField
Re: NSTextView vs NSTextField
- Subject: Re: NSTextView vs NSTextField
- From: Ross Carter <email@hidden>
- Date: Thu, 11 Nov 2010 10:46:12 -0500
> 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?)
For editing multiple strings it is more efficient to have multiple text fields than multiple text views. An NSTextView represents an entire text system, including an NSLayoutManager. For each editable string, you would create a completely new text system.
Text fields share a common text system in the form of a field editor.
This is all explained in the Text Editing Programming Guide.
_______________________________________________
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