DropObjet in controls (OpenGLSurface)

I see that OpenGLSurface has no DropObject event, although it is a class that inherits from RecControl, which has this event.
However OpenGLSurface has DragEnter, DragExit and DragOver.

Can I drop a file on a OpenGLSurface?
If it is possible, could you suggest me how to do it?
TIA

OpenGLSurface does not consume the DropObject event, so you can implement it with the window under it, or place a canvas under that serves as target.

Thanks Michel.
I’ve tried to use the window underneath (according to your recommendation) and I’ve seen these interesting things:

  1. When I drag a file onto OpenGLSurface, it doesn’t’ fire OpenGLSurface’s DragEnter event, but window’ DragEnter event. It seems that there is a bug here. OpenGLSurface shouldn’t have DragEnter (and maybe other Drag…) active because they never fire.

  2. When I drag a file onto my OpenGLSurface I pass over the window and continuously I see this icon been dragged by the mouse:

    Why is it forbidden If I have this line in the window’s Open event?

 me.AcceptFileDrop(ArxiuTipusTES.Name)

Could not reproduce the issue you describe on Mac or Windows.

However, I just tested another way : place a canvas over the OpenGLSurface, and make it the target of the drop. Insure that it is a pixel or two larger than the OpenGLSurface to avoid it becoming child. I found that moving it in with the arrow keys prevented the red outline to show.

Make it invisible in the IDE, and use self.DragEnter to make it visible. Then self.Dragexit as well as its DropObject event to make it invisible back.

It should not show the wrong way sign icon.

Thanks Michel.
I’ll try it.