Re: Modifying the clip view before scrolling.
Hi Peter, NSScroller has the following methods that might help: - (void)trackKnob:(NSEvent *)theEvent - (void)trackScrollButtons:(NSEvent *)theEvent I've never subclassed NSScroller, so can't comment on the havoc that may ensue if you go down this path. NSClipView also receives a notification when the document view changes its frame during a scroll: -(void)viewFrameChanged:(NSNotification *)notification; This is the method I use to do things *during* a scroll. Best, Cathy On Apr 2, 2008, at 10:25 AM, Peter Zegelin wrote: I have a custom view inside a scrollview and need to modify the clip view before a user begins to scroll as I have some custom rulers built into my view. Is there any way of being notified when a user is about to scroll? I tried overriding the mousedown of the scrollview but was only able to trap a mousedown in the bottom right corner, not in the scrollbars themselves. thanks! Peter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/catshive%40gmail.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Modifying the clip view before scrolling.
On Apr 2, 2008, at 01:25, Peter Zegelin wrote: I have a custom view inside a scrollview and need to modify the clip view before a user begins to scroll as I have some custom rulers built into my view. Is there any way of being notified when a user is about to scroll? I tried overriding the mousedown of the scrollview but was only able to trap a mousedown in the bottom right corner, not in the scrollbars themselves. It depends what you're trying to achieve. If the scrolling is messing up something you've drawn within the area visible through the clip view, you can tell the clip view to post bounds change notifications, then register to receive them and redraw your content on every notification (i.e. as the scrolling happens). You may need to turn off the automatic pixel copying to prevent the content from seeming to jump around. If you really need to do something before the scrolling starts, you might reconsider your approach. It might be easier to subclass NSScrollView to lay out your custom ruler views outside the clip view by overriding the 'tile' method. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Modifying the clip view before scrolling.
I have a custom view inside a scrollview and need to modify the clip view before a user begins to scroll as I have some custom rulers built into my view. Is there any way of being notified when a user is about to scroll? I tried overriding the mousedown of the scrollview but was only able to trap a mousedown in the bottom right corner, not in the scrollbars themselves. thanks! Peter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]