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

조회 수: 35 (최근 30일)
Gavin
Gavin 2024년 10월 24일
댓글: Gavin 2025년 1월 27일
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일
A few other people have reported this problem.
Unfortunately I do not recall any solutions having been posted.

댓글을 달려면 로그인하십시오.

답변 (1개)

Taylor
Taylor 2024년 10월 28일
In App Designer, select your UIFigure in the component browser. set the WindowStyle to "alwaysontop".
Alternatively, you can use the focus command.
  댓글 수: 3
Taylor
Taylor 2025년 1월 27일
Calling focus(app.UIFigure) after uigetfile returns the main app window to the top for me in R2024b. Have you tried this function?
Gavin
Gavin 2025년 1월 27일
No I was using figure(app.UIfig) I'll try focus()

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by