how to set the frame of app designer

4 visualizzazioni (ultimi 30 giorni)
when i run a APP, i want to set the app in front of screen. which parameter of APP can be changed to achieve my requirement?
  2 Commenti
Nicolas B.
Nicolas B. il 29 Ott 2019
What do you mean by "in front of screen"? Do you mean that you want to force the app to be in fullscreen mode?
In that case, there is already a thread for it.
xianhui zhang
xianhui zhang il 29 Ott 2019
I mean let the APP always present in the first place of all running SW interfaces. In other words, let the APP run on the top layer.

Accedi per commentare.

Risposta accettata

Subhadeep Koley
Subhadeep Koley il 1 Nov 2019
For MATLAB R2018a and later versions you can use the figure command to focus your app on top of all windows.
Use the code below to achieve what you want.
Go to "UIFigure > callbacks > startupFcn callback" and paste the following code
drawnow; % Put all your startup code before this line
figure(app.UIFigure);
app.UIFigure.WindowState = 'maximized'; % If your window to be maximized
Hope this helps!
  2 Commenti
xianhui zhang
xianhui zhang il 1 Nov 2019
Thanks for your suggestion. But this code will let the APP be in max windowstate. I want APP running on normal window but in thr first layer.
Subhadeep Koley
Subhadeep Koley il 1 Nov 2019
Then just delete this line
app.UIFigure.WindowState = 'maximized';
In this way you can run your app in normal window and in the top layer.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by