Re: Subclassing NSTextFieldCell
Re: Subclassing NSTextFieldCell
- Subject: Re: Subclassing NSTextFieldCell
- From: "Kyle Sluder" <email@hidden>
- Date: Mon, 28 Jan 2008 16:51:13 -0500
On 1/28/08, Michael Varlik <email@hidden> wrote:
> I played a bit with NSTextFieldCell and found out
> that I have to implement the "-(void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView" method to change the
> content of it's controlView.
This is almost definitely not what you want to do. This is not how
view contents are drawn. Most likely you want to be using
NSSecureTextField anyway -- more user choice is not always better. If
you really, *really* want to give the user the option, perhaps
subclass NSTextField to use both an NSTextFieldCell and
NSSecureTextFieldCell, drawing the appropriate one.
Either way, you probably want to read the documentation on how
controls work, and perhaps on how the Cocoa drawing model works.
--Kyle Sluder
_______________________________________________
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