uigetfile called in app designer open the file dialog screen behind the calling .mlapp
Show older comments
The following code placed in app designer with MATLAB 2022a opens the file dialog screen behind the calling .mlapp. The calling .mlapp simply has a button on the screen that calls the following code.
function ButtonPushed(app, event)
[f,p] = uigetfile();
end
There are several posts about the calling app losing focus AFTER uigetfile is called. This is a different problem. Is there a way to open the file diaglog screen in front of the calling app?
7 Comments
Smith Smith
on 28 May 2022
Smith Smith
on 7 Jun 2022
Smith Smith
on 16 Jun 2022
Cris LaPierre
on 16 Jun 2022
Smith Smith
on 16 Jun 2022
Jeff
on 8 Oct 2022
Same question.
Mario Malic
on 8 Oct 2022
there is a an answer somewhere on this forum from Friedrich IIRC, just do
drawnow;
figure(UIFigure);
after uigetfile and it should be fine.
Answers (1)
Allen
on 10 Oct 2022
0 votes
@Smith Smith, you might try using uiopen in lieu of uigetfile. Otherwise, I would suggest reinstalling MATLAB.
Categories
Find more on App Building 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!