Re: Newbie: NSScrollView
Re: Newbie: NSScrollView
- Subject: Re: Newbie: NSScrollView
- From: Matt Neuburg <email@hidden>
- Date: Mon, 25 Feb 2002 08:35:07 -0800
On Fri, 22 Feb 2002 23:20:52 -0500, "David J. Stys" <email@hidden> said:
>
I'm new to Cocoa, and am having trouble getting an NSScrollView to
>
do scrolling. Can someone help?
>
I want to display a few NSImages inside an NSScrollview, and be able to
>
scroll around.
There's really nothing to do; Cocoa makes this insanely easy. In PB, start
with an NSView subclass. In IB, put one of these in a window and surround
it with a scrollview. Back in PB, write code that does whatever you want
your NSView subclass to do: draw its contents, size itself, etc. That's
all! As long as the NSView subclass instance is larger than the content
area of the NSScrollView, scrollbars will be activated and will scroll
correctly.
Let me know offline if you need me to send you an example. m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
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.