Re: 1 NSScroller, multiple NSTextViews
Re: 1 NSScroller, multiple NSTextViews
- Subject: Re: 1 NSScroller, multiple NSTextViews
- From: Troy Stephens <email@hidden>
- Date: Thu, 23 Jun 2005 11:10:23 -0700
On Jun 22, 2005, at 11:44 PM, Julien Palmas wrote:
1 would like to have several NSTextViews of the same height sharing
the same NSScroller, which would be placed outside of those
nstextviews.
I though about setVerticalScroller : but if for exampe you do
[scrollview1 setVerticalScroller:[scrollview2 verticalScroller]],
the scroller from view2 will be moved inside of view 1 and will no
longer be properly connected to view2.
Any thoughts ?
Is what you want to stack the NSTextViews vertically, or to place
them side-by-side and have them scroll together?
In either case, you can get the effect you want by instantiating a
container view of some kind (it could be an ordinary NSView), sizing
it large enough to hold the NSTextViews in the configuration you
want, and laying out the NSTextViews by setting their "frame" rects
as desired. You would then set the container view to be the
"documentView" of an NSScrollView.
(NSScrollView and NSClipView together provide most of the useful
scrolling functionality that's in AppKit. NSScroller is a relatively
simple control that reports changes to its value, but doesn't itself
provide for scrolling of content.)
--
Troy Stephens
Cocoa Frameworks
Apple Computer, Inc.
_______________________________________________
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