MATLAB Answers

How do I make an App written in App Designer Modal?

36 views (last 30 days)
Steve Page
Steve Page on 8 Jun 2018
Edited: CHAI YUAN on 29 Mar 2019
I want to call an App written in App Designer from another App written in App Designer. While the called App is running I do not want the user to be able to interact with the calling App. How do I make the called App Modal? The WindowsStyle property of the class matlab.ui.Figure is not accessible.

  0 Comments

Sign in to comment.

Answers (2)

Chris Portal
Chris Portal on 10 Jun 2018
If you're using 18a or later, you can try using UIPROGRESSDLG to create an indeterminate progress bar while the secondary app is open. It's not the same modal behavior WindowStyle would give, but it achieves the same task:

  1 Comment

Sign in to comment.


CHAI YUAN
CHAI YUAN on 29 Mar 2019
Edited: CHAI YUAN on 29 Mar 2019
Class 'test1' is the parent window
Class 'test2' is the child window
test1:function ButtonPushed(app, event)
d = uiprogressdlg(app.test1UIFigure,'Message','Child window detected.');
app.test2Obj = test2;
% (Write your original code here.)
while 1
if exist([cd,'\CYcloneX'],'dir')
break;
end
pause(0.01)
end
close(d);
rmdir([cd,'\CYcloneX'],'s')
test2:function test2UIFigureCloseRequest(app, event)
mkdir([cd,'\CYcloneX'])
delete(app)

  0 Comments

Sign in to comment.

Sign in to answer this question.

Products