NSTextView - NSScrollView = messed up.
NSTextView - NSScrollView = messed up.
- Subject: NSTextView - NSScrollView = messed up.
- From: "Joshua S. Emmons" <email@hidden>
- Date: Fri, 20 Jun 2003 10:43:21 -0400
I've looked through the archives, and found a thread the describes my
problem perfectly:
http://lists.apple.com/archives/cocoa-dev/2002/May/14/nstextviewminusnsscrollv.txt
Unfortunately, the only answer given to the above thread is "look at
TextSizingExample". Well, I've been all through TextSizingExample and
it seems the only answer it gives to the
expanding-NSTextView-vertically-causes-it-to-shift-downwards-and-leave-behind-artifacts
problem is "put your text view in an NSClipView."
Well, I put it in a clip view, and sure enough, when the text view
expands now, it doesn't shift down the screen or leave behind artifacts.
Now it scrolls in the clip view. But it's still clipped! The size of
the NSTextView hasn't visually changed on screen because it's
constrained by the clip view.
I suppose I could register my controller to receive notification of
NSTextView's frame change and then resize my clip view accordingly, but
it's this just a little nuts? I don't want to clip my text view at
all! I just want it to grow with text. If I keep resizing my clip view
so that it shows all of the text view contained within it, it wouldn't
really be clipping at all, would it? So why use a clip view? Isn't
there some way to stop NSTextView from doing it's weirdness without
sticking it in YA view?
Cheers,
-Josh Emmons
_______________________________________________
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.