Re: Resizing view content
Re: Resizing view content
- Subject: Re: Resizing view content
- From: John Timmer <email@hidden>
- Date: Wed, 22 Oct 2003 13:46:36 -0400
>
> I've got an NSScroll view that I'd like to scale the contents of to
>
> fit a
>
> specific size.
Etc.
>
>
I'm not sure exactly what you want to do. Without a clearer
>
description of what you want and what you are seeing at the moment,
>
it's hard to help in any specific way.
>
Thanks for the description of the bounds vs. frame issue - it was very
informative.
What I'm trying to do is this:
My program generates a report with a variety of information. To output this
as a single print job, I'm reading in an HTML template file, filling in the
report info, and then sending the result to a webview. The use of a
template file in the app bundle will allow users to customize their print
formatting, so I think this is a good way to go about this.
In order to compensate for any changes the user makes in the HTLM formatting
and for the print orientation/paper size, I check the size of the webview's
document view, and scale it to fit the page width with NSView's
scaleUnitSquareToSize: method. When I do that, the width winds up great,
but I get whitespace (several pages worth on a large output) trailing the
print job - presumably the scaling left either the actual bounds or the
frame at the original height, but scaled the height of the contents as
requested.
My question is how to get the scaling done and then have the print job use
the resized view as its content. I could probably manage a kludge, but I'd
greatly prefer a method that's easier to maintain.
Thanks,
John
_______________________________________________
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.