How to keep GUI interface on top?

18 ビュー (過去 30 日間)
Ruihai Wang
Ruihai Wang 2022 年 2 月 17 日
回答済み: Michael 2022 年 8 月 4 日
I used matlab2021b to design a GUI for loading pictures, but when I select a local file, the GUI will be hidden to the next level of the desktop, why is this?

採用された回答

Abolfazl Chaman Motlagh
Abolfazl Chaman Motlagh 2022 年 2 月 17 日
編集済み: Abolfazl Chaman Motlagh 2022 年 2 月 17 日
after the line that you open a file selector (uigetimagefile for example), use this:
figure(FIGURE);
it will bring up your GUI on top again. use your gui figure name instead of FIGURE. for example if you are using appdesigner use:
figure(app.UIFigure);
  1 件のコメント
Ruihai Wang
Ruihai Wang 2022 年 2 月 17 日
Thank you! It works!

サインインしてコメントする。

その他の回答 (1 件)

Michael
Michael 2022 年 8 月 4 日
I find that if I am drawing other figures from within a GUI that the GUI starts moving around the screen.
Especially if you are testing and you just throw up a figure and plot something
to fix this -- I do something along the lines of
figure(app.UIFigure); movegui(app.UIFigure, 'west');

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by