On Jun 17, 2013, at 8:38 AM, Keary Suska wrote: > NSScrollView* myscrollview = [[NSScrollView alloc] > initWithFrame:NSMakeRect(0, 0, 200, 200)]; > NSClipView* myclipview = [[NSClipView alloc] initWithFrame:NSMakeRect(0, 0, > 500, 400)]; > [myscrollview setHasVerticalScroller:YES]; > [myscrollview setHasHorizontalScroller:YES]; > [myscrollview setDocumentView:myclipview]; > > [[myscrollview documentView] scrollPoint:NSMakePoint(300.0, 300.0)]; > > [self.window.contentView addSubview:myscrollview];
It may also be useful to mention that this code is all wrong. NSScrollView creates its own NSClipView, which is its contentView. NSClipView, AFAIK, will not function well as a standard view. HTH, Keary Suska Esoteritech, Inc. "Demystifying technology for your home or business" _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com