Found it!
-(void) scrollToTopOfScrollView:(NSScrollView*) theScrollView
{
NSPoint myScrollPosition;
if ([[theScrollView documentView] isFlipped] == YES)
myScrollPosition = NSMakePoint(0.0,0.0);
else
myScrollPosition=NSMakePoint(0.0,NSMaxY([[theScrollView documentView]
frame]) - NSHeight([[theScrollView contentView] bounds]));
[[theScrollView documentView] scrollPoint:myScrollPosition];
}
-(void) scrollToBottomOfScrollView:(NSScrollView*) theScrollView
{
NSPoint myScrollPosition;
if ([[theScrollView documentView] isFlipped] == YES)
myScrollPosition=NSMakePoint(0.0,NSMaxY([[theScrollView documentView]
frame]) - NSHeight([[theScrollView contentView] bounds]));
else
myScrollPosition = NSMakePoint(0.0,0.0);
[[theScrollView documentView] scrollPoint:myScrollPosition];
}
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]