focus ring not going away
focus ring not going away
- Subject: focus ring not going away
- From: Francisco Tolmasky <email@hidden>
- Date: Sun, 13 Apr 2003 17:13:51 -0700
I'm drawing a focus ring around a custom text field. Everything was
going fine, until I added this:
- (void)mouseDragged:(NSEvent *)anEvent
{
//somestuff
if(somestuff)
{
//somestuff
[self setNeedsDisplay: YES];
}
}
After I did this the focus ring started going crazy and getting super
thick. After much testing/debugging/etc. I figure out that what was
happening was that the area outside the textfield's bounds was not
being cleared after every redraw, and thus this area had the ring on it
several times, giving the appearance of a thicker ring. Now, when I
click away from the textfield the ring goes away completely. Why is it
that when I call setNeedsDisplay it isn't cleared for me?
I looked into some docs and they said this, if its any help:
"Note that the focus ring may actually be drawn outside the view but
will be clipped to any clipping superview or the window content view. "
Francisco Tolmasky
email@hidden
http://users.adelphia.net/~ftolmasky
_______________________________________________
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.