Re: Synchronized scrollbars (NSScrollView and NSBrowser)
Re: Synchronized scrollbars (NSScrollView and NSBrowser)
- Subject: Re: Synchronized scrollbars (NSScrollView and NSBrowser)
- From: Marcus Karlsson <email@hidden>
- Date: Tue, 14 Aug 2007 15:47:41 +0200
I now got it working. Almost. By using the enclosingScrollView
method, the NSBrowser and the NSScrollView is synchronized, but only
when I use the NSScrollView's scrollbar. Not the opposite. The
problem is that NSBrowser does not inherit from NSScrollView, and I
can't set the NSBrowser's enclosing scrollview to SynchroScrollView.
Marcus
On 12 aug 2007, at 23.12, Wain Glaister wrote:
Hi,
Presumably you have something in your NSScrollView to be seen and
scrolled?
Well, the NSBrowser is the same as that content! You may not have
noticed this if you added the NSBrowser in IB, but it is actually
in an NSScrollView itself.
So you do have two scroll views to synchronise. Look at the NSView
'- (NSScrollView *)enclosingScrollView' method.
Wain
On 12 Aug 2007, at 22:00, Marcus Karlsson wrote:
Hi.
I have a NSScrollView and a NSBrowser. Is it possible to
synchronize their horisontal scrollbars so that they will follow
each other's movements when the user interacts with one of them? I
found an article ( http://developer.apple.com/documentation/Cocoa/
Conceptual/NSScrollViewGuide/Articles/SynchroScroll.html ), but it
requires two NSScrollViews.
Marcus
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden