| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Should I calculate which part of the databrowser was clicked from the
mouse coordination?
Perhaps. This is something kludge that I can think of right now:
- Subscribe to kEventControlClick event on control target.
- CallNextEventHandler.
- If you got kDataBrowserSelectionSetChanged notification
(during the call to CNEH) you are done - nothing else to do.
- If not user clicks somewhere. It could be selected item or
some non-item part of control.
- Lets suppose it is selected item. You know all of them
(by means of GetDataBrowserItems or ForEachDataBrowserItem
with kDataBrowserItemIsSelected flag).
- For each item check if click went to its bounds.
Get item bounds with GetDataBrowserItemPartBounds.
Get click location as event parameter.
- If you found item, store appropriate info about it as
control property.
- Use this property when appropriate.
Now, the real question: what kind of UI force you to do this?
| References: | |
| >Re: Any idea about DataBrowser? (From: Mike Kluev <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.