Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Catching all clicks in a window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Catching all clicks in a window



On Mar 8, 2010, at 8:15 AM, Kent Sorensen wrote:

> I've got an old PowerPlant based application that's being updated. I have a custom HIView which hosts the PowerPlant views, and that is working fine. The PP views contain databrowsers, pushbuttons and the problem is that if I click there, the click is swallowed by the control. I need to know when a click occurred anywhere in the window so that the custom HIView at the root can activate the proper PP View.
>
> I have tried installing kEventControlClick handlers on the pushbuttons and databrowsers, and that works. I have also  traversed the subviews of the databrowser to find the scrollbars to I can catch clicks there. However, the bevel buttons above the columns in the databrowser are nowhere to be found in the databrowser subviews as far as I can see.
>
> This hacky mess leads me to believe that there has to be a better way. I'm considering a grouped overlay window that will just pass the clicks through to the main window.
>
> Does anyone have a better way to catch all clicks in a window ?

kEventMouseDown on the window should see all clicks before they are dispatched to the subviews, I think.

-eric

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Catching all clicks in a window (From: Kent Sorensen <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.