Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scroll wheel events



On 27 Nov 2003, at 04:34, Laurence Harris wrote:

On 11/25/03 6:38 AM, Jerry didst favor us with:

Hi,

I have a few custom controls which I want to add scroll wheel support
to. It seems that controls don't receive Carbon scroll wheel events, so
I have to add a handler to the Window or Application and then call
FindControlUnderMouse. Because these custom control classes are
independent, at the moment I end up installing one handler per class.
Of course, I'll be able to improve on this by installing one handler
and dispatching to the classes, but other controls such as the data
browser have scroll wheel support and must be installing their own
handlers. This seems inefficient, and I'm wondering if there's a better
way. Is there some way to get controls to receive scroll wheel events,
perhaps?

I didn't see any other replies, but I don't know of any other way to handle
them except that I wouldn't go by the mouse location. Instead, I'd go by the
current keyboard focus. For example, if you had two lists, the currently
focused list should respond to the scroll wheel, not the one with the mouse
over it.

Larry

I thought of that, but everywhere else uses the mouse location (e.g. try shrinking a Panther Finder window down so that the list on the left gets a scrollbar which gives you two lists in a window). However, I was wrong in stating that controls don't get scroll wheel events and I have it all working fine now. I don't know why it wasn't working before - I think it might have been one of those nasty events handler returning noErr instead of eventNotHandledErr things.

Jerry
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Scroll wheel events (From: Laurence Harris <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.