Re: NSScroller knob reposition
Re: NSScroller knob reposition
- Subject: Re: NSScroller knob reposition
- From: Fritz Anderson <email@hidden>
- Date: Wed, 13 Jan 2010 16:38:28 -0600
On 13 Jan 2010, at 12:32 PM, David Blanton wrote:
> I set the knob position of the horz and vert scrollers as follows:
>
> - (void)centerScrollers {
>
> [m_hScroller setDoubleValue:0.5];
> [m_vScroller setDoubleValue:0.5];
>
> }
>
> Then when I move either knob with the mouse the other knob moves as well by some random amount.
I think programmatically hauling the NSScrollers around just puts the UI out of sync with the actual position of the scroll view.
If you want to make a certain part of a view visible inside an NSScrollView, send scrollRectToVisible: to that view. See also the cousin scroll... methods of NSView.
— F
_______________________________________________
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