On 13/07/2010, at 9:43 PM, Vincenzo Morgante wrote:

> Hi,I'm a newbie and I should create a window with an image ("resource.png") 
> from resource folder of my XCode project. I realized that I should use 
> NSImageView and embed it in a scroll view, but the image is not entirely 
> showed because too large: why are the scrollers not shown?

NSImageView is not for this - it is used to display icons and so on where the 
image is scaled to fit the view, the view does not expand to fit the image.

You can accomplish this easily in a few lines of code with  a subclass of 
NSView. Set the size of the view to the image size and draw the image in 
-drawRect:, if you put it in a scrollview it will scroll as you expect.


--Graham


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to