Real trouble: Scrolling a view
Real trouble: Scrolling a view
- Subject: Real trouble: Scrolling a view
- From: Thilo Ettelt <email@hidden>
- Date: Mon, 3 Jun 2002 13:25:05 +0200
Hi! I have got real trouble with scrolling a view correctly. Well, the
scrolling actually works. I have an NSView encapsulated into an
NSScrollView. The NSView is subclassed as NSClipView, so I can use the
method scrollToPoint: Problem I'm facing now is that when I'm scrolling
to the right, it would stop at the border of the last subview (the
NSView has several subview which will be scrolle then). I just can't
find a method to stop the scolling. For example I tried this without any
success:
if ([self bounds].size.width > [[self window] frame].size.width - 24) {
if ([self bounds].origin.x + [self bounds].size.width > [[self
window] frame].size.width - 24) {
[self scrollToPoint:NSMakePoint([self bounds].origin.x+5,0)];
}
}
BTW: The 24 pixels is the window size minus the view size.
Can somebody help me?
- Cheers, Thilo
_______________________________________________
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.