uigetdir: bring to front
Mostrar comentarios más antiguos
I have created an app with appdesigner and added the uigetdir function in a button. When the button is pressed the uigetdir opens the "choose folder window" in the background, i.e., the app figure is in front of uigetdir window.
How can I bring the uigetdir window to the foreground?
Thank you for your help.
8 comentarios
Carl
el 4 de Abr. de 2017
Hi George, this isn't something that should happen. The folder selection dialog box should appear in the front. Can you tell us more about your app, and the callback itself? Are you interacting with the app in any way after you click the button?
Joseph Cheng
el 4 de Abr. de 2017
Also if you call uigetdir() or any of the uiget___() does it happen in the command window or in a script/function?
Z.L. Jia
el 7 de Abr. de 2017
Had similar issue on 2016b, the app works fine in matlab. But once compiled to exe, it wouldn't bring "uigetdir" to foreground when I first call uigetdir, but will show up to front when uigetdir called later.
STEVE
el 18 de Abr. de 2017
same issue for me in r2017a. App created with appdesigner, a pushbutton activates uigetdir(), and the window always opens in the background. No other interactions with the app after button push.
Also, after selecting a directory, the uigetdir window closes, but the main app uifigure is now in the background.
David
el 30 de En. de 2018
I am having this same problem. Has no one come up with a fix in this last year?
Andrew K
el 19 de Abr. de 2018
I'm having a similar problem. Once the directory is selected the app uifigure is pushed to the background and the main Matlab window is selected foreground. Any solutions suggested?
Rene Mayer
el 1 de Jul. de 2018
I have a similar issue with a call to questdlg from within an app. The questdlg window is created but I cannot see it and all other matlab windows including my main app are locked until I close the questdlg from the Windows bottom of the screen Matlab's list of opened items.
Jan
el 1 de Jul. de 2018
@Rene Mayer: Please post some code, which reproduces the problem and mention your Matlab version.
Respuestas (1)
Daniel Benalcazar
el 12 de Nov. de 2019
0 votos
I had the same problem, but I found online a trick to fix it. Just after calling uigetdir, set the visibility of your app on:
path = uigetdir;
app.UIFigure.Visible = 'on';
1 comentario
Anton Semechko
el 18 de Feb. de 2021
Editada: Anton Semechko
el 18 de Feb. de 2021
In Matlab R2020a this works only if you set app.UIFigure.Visible='off' before calling uigetdir and then set it to app.UIFigure.Visible='on' afterwards.
Another solution is described here: https://www.mathworks.com/matlabcentral/answers/296305-appdesigner-window-ends-up-in-background-after-uigetfile
Categorías
Más información sobre App Building en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!