How can I keep my app in front on the screen?

45 次查看(过去 30 天)
Gavin
Gavin 2024-10-24,20:01
回答: Taylor 2024-10-28,16:28
When certain functions are called such as uigetfile() or uigetdir() after the file or directory is chosen the AD generated app goes behind other windows that may be on the screen. How can I bring it back to the front?
figure(app.MyApp);
didn't work.
Also pressing enter rather than mouse clicking to get the default can result in the next popup query [ uiconfirm() or uigetfile() ] coming up behind the application and thus not responding to the enter key. Focus has been lost!
  1 个评论
Walter Roberson
Walter Roberson 2024-10-25,0:38
A few other people have reported this problem.
Unfortunately I do not recall any solutions having been posted.

请先登录,再进行评论。

回答(1 个)

Taylor
Taylor 2024-10-28,16:28
In App Designer, select your UIFigure in the component browser. set the WindowStyle to "alwaysontop".
Alternatively, you can use the focus command.

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by