Skip navigation.
 
mlRe: NSScrollView
FROM : Brian O'Brien
DATE : Tue Apr 19 20:39:12 2005

On Apr 19, 2005, at 12:07 PM, Jonathon Mah wrote:

> Hi Brian,
>
> On 20 Apr 2005, at 03:01, Brian O'Brien wrote:
>

>> Hi.. bit of a newbie question here...
>> I have been developing an image viewer and it is a subclass of an
>> NSView
>> I want to have many images on the viewer and be able to scroll
>> horizontally or vertically if necessary.
>> I was thinking the NSScrollView may be ideal for this.. would you
>> agree?

>
> Yes, you'd definitely want to use an NSScrollView. From your wording,
> though, it sounds like you may not fully understand what an
> NSScrollView does (forgive me if I'm wrong, though).
>
> A quick explanation: A scroll view is like a wrapper around another
> view. Say you have some kind of view that represents a page (700x1000
> pixels, say), and you can put text blocks wherever you want. On its
> own it'd need a really big window to display it. So you ask Interface
> Builder to make it a subview of NSScrollView, and now you can use a
> smaller window. The scroll view will take care of deciding which part
> of the larger view to display, and scrolling it. From the page view's
> perspective, though, it knows nothing about the NSScrollView - drawing
> something at 350x500 will appear in the middle of the page, not the
> middle of the scroll view.
>
> So you'd make some big view to display the images (well, the view
> could start out small and grow as things are added), and just drop it
> into an NSScrollView.
>
> Hope this helps,
>
>

Yes.. I think this helps.. :)
I just wanted to make sure I wasn't going down the wrong path.. (Which
I've done in the past)
Right Now I have an NSView with N by M (rows/cols) subviews...
I want to be able to scroll around and see a portion of these N by M
subviews...
I guess its my responsability to manage the displaying of these image
based on the slider positions.. Correct?


> Jonathon Mah
> <email_removed>
>

Related mailsAuthorDate
mlNSScrollView Brian O'Brien Apr 19, 19:31
mlRe: NSScrollView Jonathon Mah Apr 19, 20:07
mlRe: NSScrollView Brian O'Brien Apr 19, 20:39
mlRe: NSScrollView Jonathon Mah Apr 19, 20:46
mlRe: NSScrollView Mark T Apr 20, 03:12