Printing challenge with NSTextView and linked view
Printing challenge with NSTextView and linked view
- Subject: Printing challenge with NSTextView and linked view
- From: Keith Blount <email@hidden>
- Date: Sat, 4 Jun 2005 11:22:14 -0700 (PDT)
Hello,
I am trying to implement printing for a custom view
that incorporates an NSTextView and am running into
problems, and would be very grateful to anyone who
could give me tips on how to solve them.
My custom view consists of an NSTextView on the right
with a custom margin view on the left. The margin view
shows lots of little notes that are associated with
the text in the main text view. My problem is this:
how do I print the view so that pagination does not
cut split any lines of text in half in either the text
view or the text in the margin view?
This was the approach I had hoped to take, but it
doesn't work:
I thought I could override -knowsPageRange: and
-rectForPage: in the view that contains the text and
margin views and have these methods just call the text
view's methods, so that the NSTextView takes care of
itself and its lines never get broken. Then I thought
I could use
adjustPageHeightNew:newBottom:bottom:limit: to check
for any page bottoms that are halfway through a note
in the margin view and adjust accordingly. However, it
seems that these methods are mutually exclusive, so
this doesn't work.
Is the only way around this to override
-knowsPageRange: and -rectForPage: and do do all of
NSTextView's work myself here and then adjust?
Many thanks for any suggestions,
Keith
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden