Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Drag problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Drag problem



Hello,

Today I fixed a drag problem and noticed a few things.
I have a group box containing a static text box and a push button. The text box and the button cover most of the group box.
A drag handler is installed on the group box, handling the kEventControlDragEnter, kEventControlDragWithin, kEventControlDragLeave, kEventControlDragReceive, kEventControlDraw events.


This didn't work very well because a fast drag often didn't result in a "drag within" event. As a result the group box often didn't get hilited when it should (Mac OS X Leopard).
I thought I would let the text box and the button handle the "drag within" event too, but no events were generated!


I have worked around the problem by ignoring the "drag within" events altogether, updating the hiliting after receiving a kEventControlDragEnter or kEventControlDragLeave event.
I wonder if there any gotchas here?


Next I examined the controls using GetControlFeatures.
Result (flags):

group box		1-6-17
text box		6-9-17
push button 	4-6-9-17-24

None of them has the kControlSupportsDragAndDrop = 1<<12 set!

OT: why is flag 24 kControlInvertsUpDownValueMeaning set for a push button? According to the documentation this is for sliders and scroll bars.

Jan E.
_______________________________________________
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




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.