Alternative to waitfor? Need menu functionality using dialog but waitfor freezes everything until the GUI is closed.
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Thrashercharged
le 9 Oct 2015
Commenté : Thrashercharged
le 9 Oct 2015
Using R2012b I've previously created a GUI menu using "menu" but that has limitations (cannot group multiple choices into a dropdown) and also it's not recommended - dialog is recommended instead for multiple choice dialog boxes. See http://www.mathworks.com/help/matlab/ref/menu.html and http://www.mathworks.com/help/matlab/ref/dialog.html for reference.
dialog is working fine for me except for the waitfor. Using menu, I'm able to have my GUI menu, choose a selection that plots something for instance, and go back to my GUI menu where I'm waiting for another user input. But I'm not locked out of clicking on my plot(s) and moving them around, etc. However, recreating this GUI menu using dialog and uicontrols (which does allow me to group items in drop down menus so that's good), I'm forced to using waitfor to stop execution and wait for the user input. The bad thing is, everything else in MATLAB is locked out too - if I try to click on those plots to bring them upfront or move them, it just dings. Menu didn't do this - it allowed me to access those plots while still waiting for a user input.
How can I get this functionality back using dialog/uicontrol? Is this something to do with modal vs. non-modal?
0 commentaires
Réponse acceptée
TastyPastry
le 9 Oct 2015
Try changing the 'WindowStyle' property to 'normal'. The default for dialog() is 'modal', which means the dialog box created is always on top of the other GUI windows and makes the other windows inaccessible.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!