File Exchange

image thumbnail


version 2020.10.04 (3.61 KB) by Xiangrui Li
Drag and Drop OS file/folder(s) into uifigure


Updated 07 Nov 2020

View Version History

GitHub view license on GitHub

This single file implementation can set up a callback fired when files and/or folders are dropped onto a uifigure component.

In the callback, the full file and/or folder names are captured for user to decide the action. Ctrl and Shift key status during the drop event are also reported.

Example to drop file/folder into uilistbox:

DnD_uifigure(uilistbox(uifigure), @(o,dat)set(o,'Items',dat.names))

Cite As

Xiangrui Li (2021). uiFileDnD (, GitHub. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2020b
Compatible with R2020b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!