Custom NSTextField
Custom NSTextField
- Subject: Custom NSTextField
- From: Chad Eckles <email@hidden>
- Date: Fri, 25 Jul 2003 00:39:00 -0700
- Resent-date: Fri, 25 Jul 2003 11:48:19 -0700
- Resent-from: Chad Eckles <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: Cocoa Dev <email@hidden>
hello i got this code off the net and was wondering if anyone could
help me use it little new and trying to add a button to my textfield
like in Address iTunes and Safari thanks
- (void)insertText: (NSString *)s
{
if( !myButtonCell )
// create a button when text is inserted...
{
myButtonCell = [[NSButtonCell alloc] init];
... set up the cell parameters
}
[super insertText: s];
}
- (void)drawRect: (NSRect)r
{
if( myButtonCell )
{
[myButtonCell drawWithFrame: cellFrame inView: self];
[super drawRect: r];
}
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.