Re: [GREAT]NSScroller trackKnob
Re: [GREAT]NSScroller trackKnob
- Subject: Re: [GREAT]NSScroller trackKnob
- From: email@hidden
- Date: Thu, 18 Nov 2010 21:20:45 -0700
Yes, my action is being called.
So, I must find the part and if line or page figure my scroll amount
and then set the knob.
Thx,
-koko
On Nov 18, 2010, at 9:09 PM, Graham Cox wrote:
On 19/11/2010, at 3:05 PM, Graham Cox wrote:
The usual MO is to set the range of the scroller to the total
height of the view to be scrolled, less the height of the frame
through which it is viewed. You change the value of the scroller to
the amount you want to scroll, typically one line (however you
define it) for the buttons and one page for the page regions. By
using setKnobProportion: you can have a proportional knob as well.
Actually, that seems not to be true these days. NSScroller has a
fixed range from 0..1, and your client is responsible for scaling
the value to whatever the range needed to scroll the view. This is
easier than what I described, which is how it was done in the old
days (Mac OS 9 and earlier, which had integer based controls).
--Graham
_______________________________________________
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