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: Detecting clicks in a DataBrowser



Larry,

On Jul 30, 2005, at 11:28 pm, Laurence Harris wrote:

I want to have a column of icons in a DataBrowser in which no items are

selectable, but I want to be able to detect clicks in the icons. AFICT there

is no notification sent when this happens (duh). Any suggestions? Thanks,



The only way I have found to do this is to install a click handler on the DB control as a whole, and then loop through all the items, and then loop through all the properties, getting their enclosing rect and testing against that. As you are only interested in the one property then you can skip the property loop.

You could also work around this using a custom column or columns, and drawing them yourself. You could then make them selectable, but never draw them as selected, and use the custom hit testing call back.

What we really need is

DataBrowserItemID GetDataBrowserItemAtPoint( ControlRef browser, const Point point, DataBrowserPropertyID *property );

and, when I get enough spare moments I will file enhancement requests for this and many others.

Douglas

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

This email sent to email@hidden

References: 
 >Detecting clicks in a DataBrowser (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.