Newbie on printing views
Newbie on printing views
- Subject: Newbie on printing views
- From: Graham Gyatt <email@hidden>
- Date: Mon, 10 Jun 2002 21:44:05 -0700
(Second attempt at getting some help with this...)
I have a simple, single (small) window app, and the window has a single
(small) drawer.
To print the window, I can just say
[myWindow print:self];
or
[[myWindow contentView] print:self];
depending on whether I want the entire window or just the contents -
both work fine.
I can also achieve the same result by creating my own NSPrintOperation
using my contentView:
- (IBAction)print:(id)sender
{
NSPrintInfo *printInfo = [NSPrintInfo sharedPrintInfo];
NSPrintOperation *printOp = [NSPrintOperation
printOperationWithView:[myWindow contentView] printInfo:printInfo];
[printOp setShowPanels:YES];
[printOp runOperation];
}
It works fine too. But none of these methods will print the drawer or
its contents (even when open) since the drawer is a different (not a
sub-) view.
When my drawer is open, I would like to ALSO print, on the SAME page
(both will fit), the content of the drawer - so the user can print, in
effect, a snapshot of the entire app interface (less menu
bar). I'm new to Cocoa printing, and I'm trying to figure out the
easiest way to do this. Looks like I might have to somehow recreate
what I want to print in another view hierarchy offscreen? But this
seems clumsy and I suspect cocoa has a way to do this more elegantly.
Any suggestions appreciated.
Thanks
- Graham
_______________________________________________
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.