No License
Example Drag and Drop in Matlab Figures from Windows Explorer or Other Apps
DrapDropTest creates a simple figure which shows the implementation of dnd using activex.
The microsoft RichtextCtrl.1 activex control is used to demonstrate dnd ability. The control
has several events to which matlab can respond, in particular the OLEDragDrop Event.
Type DragDropTest from the command line to test. Once the figure is
running try dragging a text file into either of 2 areas on the figure.
The upper portion will just populate a listbox with the names of files
that have been dragged into the bar above it. The lower box displays the
contents of any text file dragged into it. The bottom box also allows
text to be dragged from a text editor such as wordpad.
This example is not intended to be robust, so please feel free to use it,
but make sure to check over the code in detail to make sure it doesn't
break. I've just coded this quickly to demonstrate the property. Feel
free to email me with questions comments.
Cite As
Raphael Austin (2024). Drag and Drop (https://www.mathworks.com/matlabcentral/fileexchange/16312-drag-and-drop), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |