Borrar filtros
Borrar filtros

Reload a UIControl's value from .fig file

3 visualizaciones (últimos 30 días)
David Wasserman
David Wasserman el 13 de Mayo de 2020
Respondida: Rik el 13 de Mayo de 2020
My GUI has an edit control. When the GUI starts, the edit control shows the text specified as the 'String' property in the .fig file, which is '.6'. Later, the text may get changed. Can I put a statement in a callback function that will cause the GUI to reload this text from the .fig file? I don't want to use
set(hObject, 'String', '.6')
because the property may later get changed in the .fig file.

Respuestas (1)

Rik
Rik el 13 de Mayo de 2020
Why use a fig file to store data? You shouldn't be storing data in a fig file, just as you shouldn't be storing code in a mat file.
If you want a reset funcitonality you will have to make that yourself by storing the initial values during the startup.
I would encourange you to read this thread. You will also find an example of how to implement this in a class. How to implement it in a GUIDE-created GUI is a bit more tricky, as you'll have to hard-code which objects and parameters to store.

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by