• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Custom NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom NSTextField


  • Subject: Custom NSTextField
  • From: Chad Eckles <email@hidden>
  • Date: Fri, 25 Jul 2003 00:39:00 -0700

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.

  • Prev by Date: plist Problem
  • Next by Date: Monospace fonts and NSFontPanel?
  • Previous by thread: Re: plist Problem
  • Next by thread: Custom NSTextField
  • Index(es):
    • Date
    • Thread