Re: Creating a NSTextField
Re: Creating a NSTextField
- Subject: Re: Creating a NSTextField
- From: Jerry Krinock <email@hidden>
- Date: Tue, 26 Feb 2008 09:24:53 -0800
On 2008 Feb, 26, at 8:13, Felipe Monteiro de Carvalho wrote:
But there is no initialization method for a NSTextField. How can I
create a NSTextField? Just alloc?
NSTextField is a subclass of NSControl. Use [[NSTextView alloc] -
initWithFrame:].
Then use -addSubview: on your window's -contentView. And since your
NSTextView is not instantiated in Interface Builder, keep it in an
instance variable or something.
_______________________________________________
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