Re: Confused about NSPrintInfo margins
Re: Confused about NSPrintInfo margins
- Subject: Re: Confused about NSPrintInfo margins
- From: Joel Norvell <email@hidden>
- Date: Thu, 9 Jul 2009 12:22:40 -0700 (PDT)
Graham,
I'm not sure if this is exactly what you were talking about, but I did a test in the printShowingPrintPanel of a program I'd written.
The NSPrintInfo methods setLeftMargin, setBottomMargin, setRightMargin and setTopMargin all affect the margin values within the NSPrintInfo instance.
Here's the test code with the before and after values I saw.
- (void)printShowingPrintPanel:(BOOL)flag
{
NSPrintInfo *printInfo = [NSPrintInfo sharedPrintInfo];
float testLeft = [printInfo leftMargin];
float testBottom = [printInfo bottomMargin];
float testRight = [printInfo rightMargin];
float testTop = [printInfo topMargin];
// L, T, R, B IS NOW 72, 90, 72, 90
[printInfo setLeftMargin: 0];
[printInfo setBottomMargin: 0];
[printInfo setRightMargin: 0];
[printInfo setTopMargin: 0];
testLeft = [printInfo leftMargin];
testBottom = [printInfo bottomMargin];
testRight = [printInfo rightMargin];
testTop = [printInfo topMargin];
// L, T, R, B IS NOW 0, 0, 0, 0
...
}
This was done using Xcode 3.1.3.
HTH,
Joel
_______________________________________________
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