Azzera filtri
Azzera filtri

uigetfile dialog box pops up behind app window

10 visualizzazioni (ultimi 30 giorni)
Barry Bickmore
Barry Bickmore il 5 Dic 2018
Commentato: Andrew Davies il 27 Mag 2020
I have created an app in the app designer in which I call uigetfile or uigetdir to load text files with data. It all works just fine, except that the dialog box to select the file/directory pops up behind the app window, and I have to move the app window aside to access the dialog box. When I'm running it on top of MATLAB (in a MATLABWindow) the dialog box appears to be associated with the main MATLAB program (the icon for the main program bounces up and down on my Mac toolbar, and when I click on it I can see the dialog box,) rather than with the app in the MATLABWindow. However, if I compile the app to run as a standalone on Mac or Windows, the dialog box still pops up behind the main app window.
Does anyone know how to fix this?
  4 Commenti
Kevin Chng
Kevin Chng il 5 Dic 2018
Do you mind upload your .mlapp? copy them and save them in .m file since here does not accept .mlapp.
Greg
Greg il 6 Dic 2018
I just built a test app with a button that calls uigetfile, and it didn't have a problem. I'm on Win10, R2018b.

Accedi per commentare.

Risposte (1)

Barry Bickmore
Barry Bickmore il 5 Dic 2018
Ok, I think I figured out a way to do it.
Put this before the call to uigetfile:
app.NameOfYourUIFigure.Visible = 'off';
and this after:
app.NameOfYourUIFigure.Visible = 'on';
  1 Commento
Andrew Davies
Andrew Davies il 27 Mag 2020
Obviously this will cause your app to disappear, which could be confusing. For instance on my Mac with two displays the file open dialogue appears on a different monitor to the app. So the app just appears to vanish unless you hunt on teh other screen for the open dialogue. R2020a

Accedi per commentare.

Categorie

Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by