Re: In need of some help with NSToolbarItem
Re: In need of some help with NSToolbarItem
- Subject: Re: In need of some help with NSToolbarItem
- From: Peter Ammon <email@hidden>
- Date: Tue, 4 Mar 2008 15:32:45 -0800
On Mar 4, 2008, at 2:59 PM, Matthew Delves wrote:
On 05/03/2008, at 9:38 AM, Peter Ammon wrote:
On Mar 4, 2008, at 1:55 PM, Matthew Delves wrote:
Greetings,
I've been reading through some of the apple documentation and
have a basic understanding of what needs to be done when creating
an NSToolbarItem subclass that contains a custom view.
What I'm not sure about is how to pass any mouse click events
through to the custom view rather than have them handled by the
NSToolbarItem.
Currently the custom view contains an NSSlider and an NSTextField.
Any help is greatly appreciated.
You do not need to take any special action here. Mouse events
will be passed to your view automatically. Are you seeing
something different?
What I'm seeing is that when I try to drag the NSSlider it will
move the window instead. Is there a way to get around this?
If you don't want clicks in your view to allow dragging the window,
you should override -[NSView mouseDownCanMoveWindow] to return NO.
By default, however, sliders do not allow dragging the window, so you
should not see a click in a slider move the window unless you've
overridden hitTest: to intercept clicks.
I wasn't able to reproduce this in a test app. If you're still
seeing this and the above didn't help, please send me an app that
demonstrates this. Thanks!
-Peter
_______________________________________________
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