• 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
NSView unit scale question ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSView unit scale question ?


  • Subject: NSView unit scale question ?
  • From: Robert Miller <email@hidden>
  • Date: Fri, 18 Feb 2005 10:03:39 -0500

Hello,

Has anyone had in depth experience with the 'scaleUnitSquareToSize' call vs. the resulting frame size of the receiver ? I'm working on an application that has movable / resizable custom subviews that are also scalable. I've done some research and have discovered some very useful examples on scaling using the scaleUnitSquareToSize' call and understand it's use and how the bounds rectangle of a view is affected by this call. The call does not affect the frame rectangle as would be expected however, I want to be able to display the entire scaled bounds in the NSView after scaling. I've added some code which effectively readjusts the frame rectangle to do this. The real issue is that once a view is scaled it seems that any subviews within that view seem to have lost their auto resize mask. (even though diagnosis has shown that they haven't) The behavior of subviews when a previously scaled view is subsequently resized appears as if they have. Example. A custom view is created and displayed, the custom view contains sub views whose 'spring' settings include NSViewMinYMargin and NSViewMaxXMargin which cause the subviews to 'stick' to the top left corner of the view when the view is resized such that its width and height are increased. After the view is scaled the subviews no longer behave as if the previously mentioned resize settings are in effect. (even though as previously stated the values for resizing have not changed). In other words when the view is resized after a scale is applied the subviews now move and no longer stick to the top left corner. Is this some strange anomaly with scaling and resizing mask behaviors internal to NSView. Does my example make sense ?

Thanks in advance for any help,
Regards,
Bob M.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSView unit scale question ?
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: Creating NSViews with code.
  • Next by Date: How to create a subview NIB
  • Previous by thread: First cell in NSTableView not holding data
  • Next by thread: Re: NSView unit scale question ?
  • Index(es):
    • Date
    • Thread