开发者

NSImageView Drag and Drop issues

开发者 https://www.devze.com 2023-02-11 00:00 出处:网络
I have an NSBox containing two static text fields and two NSImageVie开发者_运维百科w. NSBox is subclassed as myNSBox.

I have an NSBox containing two static text fields and two NSImageVie开发者_运维百科w. NSBox is subclassed as myNSBox. I have registered the view/NSBox to accept appropriate drag types. So when i drag items to the static text fields, the drag-drop operations work. However, dragging and dropping onto any NSImageView (which are subviews of NSBox) does not work. An interesting observation is that i am unable to drag and drop files from Finder onto the image view. Drag and Drop from outline view to the NSImageView works fine.

Any suggestions?


Anyways, i found the solution. One has to unregisterForDragTypes the image view.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号