Skip navigation.
 
mlRe: How to use setNeedsDisplayInRect?
FROM : Steve Mills
DATE : Sat Nov 16 20:54:46 2002

On Saturday, November 16, 2002, at 10:01 AM, <email_removed> wrote:

> How do I use the  setNeedsDisplayInRect:(NSRect)dirtyRect?
>
> Isn't the dirtyRect supposed to be an NSRect circumventing the
> rectangle on screen which needs redrawing?


Huh? If you need a specific part of your view to redraw, you "dirty"
that part with setNeedsDisplayInRect:dirtyRect. Like when you set a
checkbox's state to on or off, it probably calls this routine with only
the checkbox part of the control's bounds, since it doesn't need to
redraw the label portion of it.

I use this routine in my app, fer example, to make the blinking
insertion point redraw by only dirtying the rect enclosing the caret.

Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlHow to use setNeedsDisplayInRect? jontolof Nov 16, 12:59
mlRe: How to use setNeedsDisplayInRect? Steve Mills Nov 16, 20:54