• 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
proportionally constrain size of NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

proportionally constrain size of NSView


  • Subject: proportionally constrain size of NSView
  • From: Chuck Soper <email@hidden>
  • Date: Fri, 1 Aug 2003 12:31:49 -0700

Hello,
What is the best way to proportionally constrain the size (bounds or frame) of a NSView instance as its window is resizing? My NSView object does auto-resize with the window's edges.

I thought that I could simply set the aspectRatio of the window, but believe that my window may have different proportions than the view. This because the window size changes when its toolbar is shown or hidden.

I want to directly constrain the view's size during a window resize. If I send setBoundsSize: to my view while responding to the NSWindow delegate, windowWillResize:toSize:, then I'm not sure how to get the correct window size.

Is there a recommended way to proportionally constrain the size of an NSView instance during a window resize?
Thanks,
Chuck
_______________________________________________
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.
  • Prev by Date: Re: Adding firewall rules at runtime...
  • Next by Date: Re: Fast User Switching in Panther...
  • Previous by thread: Re: Custom layout
  • Next by thread: Overriding NSTextField Background Drawing
  • Index(es):
    • Date
    • Thread