KeyWorksRW / wxUiEditor

RAD tool used to create and maintain wxWidgets UI elements.
Apache License 2.0
66 stars 7 forks source link

Add support for wxEVT_DROP_FILES #1301

Open KeyWorksRW opened 11 months ago

KeyWorksRW commented 11 months ago

Description:

A OnDropFiles event should be added to the standard window events. If the user specifies a handler, then when the window is created, it must call widget->DragAcceptFiles(true);.

Randalphwa commented 10 months ago

Adding the event is fairly straightforwad, but and enabling DragAcceptFiles() is also straightforward if an event handler was created. However, without calling SetDropTarget() you still can't drop anything onto the control. The documentation for SetDropTarget() expects the user to provide a class derived from wxDropTarget. There are other classes one can derive from such as wxFileDropTarget but there still is a virtual method that has to be overridden (OnDropFiles() for wxFileDropTarget). It could be done be creating a wxDropTarget node that would be a child of the control to add the drop target to.

I want to leave this issue active, but the reality is very few people are likely to use it, which means it's a lower priority then the features/issues that would impact a much larger number of users.