Microscopy Image Browser 2.91
MIB
Loading...
Searching...
No Matches
DnD_uifigure.m File Reference

Set up a callback when file/folder is dropped onto a uifigure component. More...

Functions

function h = DnD_uifigure (target, dropFcn)
 Set up a callback when file/folder is dropped onto a uifigure component.
 
function  DnDuifigure>dragEnter (ww, names, h)
 
function  DnDuifigure>drop (h, unused1, ww)
 

Detailed Description

Set up a callback when file/folder is dropped onto a uifigure component.

Function Documentation

◆ DnD_uifigure()

function h = DnD_uifigure ( target,
dropFcn )

Set up a callback when file/folder is dropped onto a uifigure component.

The target can be a uifigure or any uifigure component.

dropFcn is the callback function when a file is dropped. Its syntax is the same as general Matlab callback, like @myFunc or {@myFunc myOtherInput}. In the callback, the first argument is the target, and 2nd the data containing ctrlKey: 0 % true if Ctrl key is down while dropping shiftKey: 0 % true if Shift key is down while dropping names: {/myPath/myFile} % cellstr for full file/folder names

Example to show dropped file/folder onto uilistbox
target = uilistbox(uifigure, Position, [80 100 400 100]); DnD_uifigure(target, @(o,dat)set(o,Items,dat.names));

Referenced by mibDeepController.mibDeepController().

Here is the caller graph for this function:

◆ DnDuifigure>dragEnter()

function DnDuifigure>dragEnter ( ww,
names,
h )

◆ DnDuifigure>drop()

function DnDuifigure>drop ( h,
unused1,
ww )