How to do a "drag'n'drop" (from a file on my computer to a GUI) ?
35 views (last 30 days)
Show older comments
Hi,
I need to create a drag and drop to put it on the graphic interface of a program created in Matlab but I didn't find out how. The drag and drop must be from a wav file located on my computer to the GUI to be then reused through the program.
Any help would be appreciated :)
Thank you in advance for your answers
0 Comments
Accepted Answer
Geoff Hayes
on 10 Apr 2016
Eugy - I don't think that there is a way to drag and drop a file from your workstation onto a open MATLAB GUI. (Though this would be a neat activity.) An alternative is to prompt the user to choose a file. See uigetfile for details.
0 Comments
More Answers (3)
Image Analyst
on 10 Apr 2016
Eugy: I don't know if that's possible with GUIDE, but I believe GUIDE is too primitive. You might be able to do it with App Designer (GUIDE's replacement) but I haven't had a chance to check it out yet.
Otherwise, if it's even possible, your only chance is Yair http://undocumentedmatlab.com/?s=drag+and+drop. Good luck.
0 Comments
Eugy
on 12 Apr 2016
2 Comments
Image Analyst
on 12 Apr 2016
An even better workaround is to use a list box to load up your data or image files. Why burden the user with the tedious uigetfile()?
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!