MATLAB: Use “uigetfile” in App Designer

app designerMATLABuigetfile

When i use "uigetfile" command in App Designer, chose a file and click "open", the whole UIFigure will automatically go under the Matlab-mainwindow and all other files . I must choose the UIFigure again to use it. How to solve it problem.

Best Answer

Wow, that's super annoying (I just confirmed it, r2019a). It's happening in the uigetfile() function.
A workaround is to just call your app figure right after the uigetfile() line.
f = uigetfile();
figure(app.UIFigure)