• 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
What's wrong with my drawInteriorWithFrame implementation ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What's wrong with my drawInteriorWithFrame implementation ?


  • Subject: What's wrong with my drawInteriorWithFrame implementation ?
  • From: Eric Morand <email@hidden>
  • Date: Wed, 7 Sep 2005 19:15:09 +0200

Hi list !


I'm implementing my own NSButton subclass, currently only drawing a string, and have a strange problem when I click on my button : each time I click on my button, the string appears darker, just like if it was drawn above itself again and again !


Here is the only thing I have subclassed in my NSButtonCell subclass (none my NSButton subclass method has been subclassed for the moment) :


- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { [self drawInteriorWithFrame:cellFrame inView:controlView]; }

- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *) controlView
{
[[self title] drawInRect:cellFrame withAttributes:nil];
}




It was just supposed to be a test, that's why it is so simple. But even with such a simple code, it doesn't work as expected.


I don't understand why the string draw above itself each time I click on the button. Is there something I should had to erase the previous content of the cell ?




Thanks,


Eric. _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: What's wrong with my drawInteriorWithFrame implementation ? (SOLVED)
      • From: Eric Morand <email@hidden>
  • Prev by Date: Re: IBOutlet not 'sticking' at runtime
  • Next by Date: Spotlight for ranking and relativity?
  • Previous by thread: Re: IB - HowTo put an NSButtonCell in TableColumn
  • Next by thread: Re: What's wrong with my drawInteriorWithFrame implementation ? (SOLVED)
  • Index(es):
    • Date
    • Thread