Azzera filtri
Azzera filtri

GUIDE Interface: Do not populate when loading

1 visualizzazione (ultimi 30 giorni)
Robert Worm
Robert Worm il 4 Set 2018
Risposto: Walter Roberson il 4 Set 2018
When running a GUIDE interface data from previous sessions seem to be preloaded.
Instead only the bare interface should be displayed - without any data plotted and items selected.

Risposte (1)

Walter Roberson
Walter Roberson il 4 Set 2018
In the case where a GUIDE GUI has been made invisible but not closed, then running the .m will make the GUI visible again without changing its state.
Other than that, if you accidentally save the GUI inside GUIDE after you have run the code, then what is saved is the state at the time you request the save, which would include anything that the user had changed. In order to get around this problem, probably the best approach is to go back into GUIDE, clear the state of those fields, and then save again, so that the next time you run, you get the empty version. But another possibility is to add code to the OpenFcn callback to go in and reset the state before the user has a chance to interact with it. That can be a good approach sometimes, especially if you have added some kind of "reset" button for the user to be able to reuse the program without closing the GUI.

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by