• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: IB and NSImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IB and NSImageView


  • Subject: Re: IB and NSImageView
  • From: Marco Binder <email@hidden>
  • Date: Mon, 9 Jun 2003 17:13:23 +0200

Hi Laurent,

Isn't there a simple way in IB (I tried to add springs everywhere) so that NSImageView gets the size of its internal image ? I am sure it is easy to do by code, by I was just wondering, it seems so obvious to me that this should be the "normal" behaviour with "no scaling".


No, there is not. With the springs, you can only tell a view to resize accoring to its superview (so if you resize the window, this can resize the scrollview which in turn resized its imageiew).

The autoscaling feature means, the NSImageView will resize the image to fit into its bounds. If you disable this flag, the view will simply not scale the image but will only display the parts of it, that fit into the view's bounds. That is the normal behaviour, and I think, this should be the normal behaviour.

If you want to have the NSImageView resize to the image's size, you have to manually initialize the NSImage with your source, query it for its size, set the NSImageView's frame to this size and then call setImage on the NSImageView with your image as a parameter.


Marco


--
|\ /| email@hidden http://www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
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.

References: 
 >IB and NSImageView (From: Laurent Joubert <email@hidden>)

  • Prev by Date: Re: Serious AddressBook framework problems
  • Next by Date: Re: Serious AddressBook framework problems
  • Previous by thread: Re: IB and NSImageView
  • Next by thread: C question for you old guys ;-)
  • Index(es):
    • Date
    • Thread