Simple view in NSScrollView
Simple view in NSScrollView
- Subject: Simple view in NSScrollView
- From: Stephan Burlot <email@hidden>
- Date: Mon, 23 Jul 2007 12:43:48 +0200
Hi,
I've set up a simple NSView subclass that just draw a text when
called. This view is enclosed in a NSScrollView.
When I scroll slowly, only part of the text is drawn, with left over
of the previous text. If I scroll using page up/down, all text is
displayed.
My custom view doesnt do anything special. It's just a flipped view.
This is the drawRect method of my view:
- (void)drawRect:(NSRect)rect
{
NSPoint p;
[self lockFocus];
[[NSColor whiteColor] set];
[NSBezierPath fillRect:rect];
p = rect.origin;
p.y = p.y + 5;
p.x += 5;
[headerText drawAtPoint:p withAttributes:NULL];
[self unlockFocus];
}
What can be wrong here?
Thanks,
Stephan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden