What's wrong with my drawInteriorWithFrame implementation ?
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