Effacer les filtres
Effacer les filtres

Only perform a function when the working dialog is not closed

4 vues (au cours des 30 derniers jours)
Thinh
Thinh le 30 Oct 2023
Modifié(e) : Thinh le 30 Oct 2023
Hi everybody,
I am creating an Matlab app by Matlab GUI. Currently I have an unresolved problem and I hope someone can help.
I just want to perform a function when someone clicks the icon on toolbar and they have to close that dialog to be able to perform another function.
Thank you for your help
  2 commentaires
Walter Roberson
Walter Roberson le 30 Oct 2023
If someone were to look only at your title, they might guess the question is about how to tell whether a window is open or is minimized. That is not what your question turned out to be, but for the sake of anyone who happened to wander across this with that topic in mind:
You can tell whether a MATLAB figure is minimized by checking the figure WindowState property, which is 'minimized' if the window is minimized. If the window is open but docked then the WindowState will be 'docked'; if the window is open and not docked then the WindowState will be 'normal'
Thinh
Thinh le 30 Oct 2023
Yes, Thank you very much Walter Roberson

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 30 Oct 2023
See uiwait and waitfor
See also questdlg() https://www.mathworks.com/help/matlab/ref/inputdlg.html#d126e819840 in particular the option WindowStyle (which is default)
questdlg() opens a traditional figure and uses traditional figure components rather than App Designer.
The documentation for dialog shows the flow of (traditional) components for a modal dialog. You could adapt that flow for App Designer.

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by