How can I add drag and drop functionality to a label element


It’s a cool engine!

I am using it to develop a simulator.

I want to add the drag and drop functionality to my gui, e.g., label, which will work as file manager (load files).

Can anybody share some code snippets or give me some hints on it!



You can take a look at this GUI element used by the editor:

Note this only handles the drag and drop events initiated from the framework itself, not things like drag and dropping a file from the OS. To handle OS drag and drop events you’ll need to incorporate the DropTarget object.


Nice, I will try it out! thank you so much!