MATLAB Answers

Uigetfile will make app be behind another windows.

46 ビュー (過去 30 日間)
Shao-Qi Lei
Shao-Qi Lei 2016 年 12 月 21 日
回答済み: Ajay Kumar 2019 年 11 月 20 日
I use APP Designer to make a App figure. I want to load my file and display its name,so I use uigetfile. But used uigetfile will make my figure be behind another windows, I have to click it in Taskbar again. Why is this so?

  0 件のコメント

サインイン to comment.

採用された回答

Ajay Kumar
Ajay Kumar 2019 年 11 月 20 日
add these lines after uigetfile
drawnow;
figure(app.UIFigure)
assuming your UIFigure's name is app.UIFigure

  0 件のコメント

サインイン to comment.

その他の回答 (3 件)

Melaku Eneayehu
Melaku Eneayehu 2018 年 2 月 20 日
add the following two lines of code just after uigetfile() app.UIFigure.Visible = 'off'; app.UIFigure.Visible = 'on';
don't forgot to edit figure per-fix if you don't use the default one

  0 件のコメント

サインイン to comment.


Riyadh Abbas
Riyadh Abbas 2017 年 5 月 26 日
Hi there, I found a solution to this issue provided by http://undocumentedmatlab.com/blog/solving-a-matlab-hang-problem, which suggested adding two lines drawnow; pause(0.05);
I tried it and it did work for me, hope can solve your problem.

  2 件のコメント

Petar Lambrev
Petar Lambrev 2017 年 6 月 12 日
drawnow; pause(0.05); Does not work for me. After closing get file window, the main app window is in the background.
Chris McRaven
Chris McRaven 2017 年 6 月 16 日
This does not work for me either. I have described my steps to reproduce here.

サインイン to comment.


Matthew Thomas
Matthew Thomas 2019 年 11 月 18 日
It does seem to be unintended behaviour though, it is frustrating to need to work around this.

  0 件のコメント

サインイン to comment.

サインイン してこの質問に回答します。


Translated by