• 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
Resizing view content
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Resizing view content


  • Subject: Resizing view content
  • From: John Timmer <email@hidden>
  • Date: Wed, 22 Oct 2003 12:10:50 -0400

I've got an NSScroll view that I'd like to scale the contents of to fit a
specific size. I've found that getting the document view and calling:

[thePrintView scaleUnitSquareToSize: NSMakeSize( 0.63, 0.63)];

Scales it down nicely, but now there's a lot of white space at the bottom.
I've tried resetting the bottom of the bounds origin (to 0- .37 * the
previous height), but I still wind up with white space (now, both on the top
and the bottom). I'm not going to try resizing the containing view until I
actually get my view down to the bottom of it first, but I assume I won't
get that right immediately, too.

Is there a better way to scale the contents? Any examples?

Incidentally, I can't find a cogent description of the difference between
the bounds and the frame of a view, which might help me sort this out on my
own.

Cheers,

JT
_______________________________________________
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.

  • Follow-Ups:
    • Re: Resizing view content
      • From: publiclook <email@hidden>
    • Re: Resizing view content
      • From: "Alastair J.Houghton" <email@hidden>
References: 
 >Webkit printing (From: John Timmer <email@hidden>)

  • Prev by Date: The cocoaBB has launched!!!
  • Next by Date: Re: Way to get IB to always be aware of my constantly used classes?
  • Previous by thread: Webkit printing
  • Next by thread: Re: Resizing view content
  • Index(es):
    • Date
    • Thread