Re: Printing NSTableView and more
Re: Printing NSTableView and more
- Subject: Re: Printing NSTableView and more
- From: p3consulting <email@hidden>
- Date: Sun, 21 Dec 2003 10:00:38 +0100
To print a table view you better have to make another view hierarchy
used only for printing.
This print view will contain another NSTableView but without enclosing
it into a NSScrollView of course.
You should then resize it so that everything is visible (width and
heigth).
However if you want to re-print headers on top of each page you should
probably go to do the tiling yourself.
(calculating the "best" width for each column, how many lines per page,
etc.)
Or maybe use some open source report writer if you have other needs
like sum per page, running totals
Pascal Pochet
P3 Consulting
On 20 dic. 2003, at 07:52, Jay Rimalrick wrote:
I am trying to get a NSTableView to print without the scroll bars but
with the
column headers. The code below prints part of my NSTableView without
scroll
bars or headers.
1) how do I get the headers to print without the scroll bars?
2) when the NSTableView prints it crops off any columns that don't
print on a
page. It prints everything vertically but doesn't print all of the
data
horizontally.
3) how can I print information I have stored in strings before the
NSTableView
prints?
NSView *aprintView = [[NSApp mainWindow] contentView];
NSArray * viewsToPrint = [aprintView subviews];
NSView *theTextView = [[viewsToPrint objectAtIndex: 0]
documentView];
[theTextView print: self];
Thanks in advance,
jay
---------- Original Message ----------------------------------
From: "Jay Rimalrick" <email@hidden>
Reply-To: <email@hidden>
Date: Fri, 19 Dec 2003 18:13:12 -0500
I have a NSTableView that I print by simply using
[myTableView print: self];
but this does not print the column headers, why not?
Also I would like to print some information before I print the
NSTableView
but have it all appear on the same page ... how do I go about this?
Any and all information is greatly appreciated.
-jay
________________________________________________________________
Sent via the WebMail system at 1st.net
_______________________________________________
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.
________________________________________________________________
Sent via the WebMail system at 1st.net
_______________________________________________
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.
_______________________________________________
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.