• 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: Subview bounds resizing when frame resizes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subview bounds resizing when frame resizes


  • Subject: Re: Subview bounds resizing when frame resizes
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 2 Mar 2008 23:00:07 -0800


On 2 Mar '08, at 4:03 PM, Steve Weller wrote:

The subview bounds are set correctly at the start, but if I make the subview's frame larger, the bounds are scaled larger too. I thought from this in the NSView docs that the subview's bounds would stay fixed:

Nope. Changing a view's frame does not change the scale factor of the contents. 99% of the time that's what you want — resizing a button shouldn't magnify its text! For the case where you do want the view's contents to zoom as you resize it, you'll need to recompute the bounds appropriately when the view's frame changes.


—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Subview bounds resizing when frame resizes (From: Steve Weller <email@hidden>)

  • Prev by Date: Re: Spotlight importer for records
  • Next by Date: Re: When in the launch cycle does coredata data become available.
  • Previous by thread: Re: Subview bounds resizing when frame resizes
  • Next by thread: Handling mouse click event on a NSButton
  • Index(es):
    • Date
    • Thread