NSClipView question (two actually)
NSClipView question (two actually)
- Subject: NSClipView question (two actually)
- From: johness does <email@hidden>
- Date: Mon, 14 Jul 2003 13:52:04 -0700 (PDT)
Ok, so here's the deal. If some of you may recall I
recently posted asking how to do the whole line
numbering with a textview thing. I got a few ideas
from a previous thread but I didn't like them much (no
offense).
What I did instead was make a linenumberview thing and
place it within an NSClipView. Thus, my scroll view
has two clip views. Everything works and is in order,
etc. Except for one thing. The NSClipView is set to
draw it's background and I set the background color to
[NSColor windowBackgroundColor]. This worked and I
have efiicent scrolling, BUT, the pinstripes scroll
along with the numbers, which, are not that noticable,
but can appear unpolished to the knowing eye.
So, it would appear I have a catch-22 no? Either I
have efficient scrolling, through copy-on-scroll, or I
have stationary pinstripes.
Not the case. using Quartz Debug I found that somehow
Project Builder achieves both. When I scroll only the
new areas are redrawn, but somehow the pisntripes are
stationary. Now, I am going to check again later, but
I am almost certain this was the case. Project
Builder does occasionaly mess up the pinstripes though
(if you look closely) but its pretty good.
Anyway, I was wondering how I could achieve this at
any rate in the most efficient fashion. I wish
NSClipView would store its document views drawn area
in a transperant image, thus redrawing the background
but keeping the actual content scrolling efficient.
Is there away to do this?
On a similar note, while using Quartz Debug I noticed
that my textview was NOT efficiently scrolling,
redrawing everything. My textview is subclassed and
thus created programatically but I set the contentview
setcopiesOnScroll to YES, so I do not understand why
it is not scrolling efficiently. Any Ideas?
Thanky you in advance,
=====
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
_______________________________________________
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.