필터 지우기
필터 지우기

app.UIfigure.Visible does not keep the app window on top of all other windows

조회 수: 15 (최근 30일)
Hi all
using the following line does not really keep the app window in appdesigner on top of all other windows , I have two pushbuttons and for each, the window should remain on top:
app.UIFigure.Visible = 'on';

채택된 답변

Cris LaPierre
Cris LaPierre 2020년 3월 21일
편집: Cris LaPierre 2020년 3월 21일
Try using drawnow with the figure command in your button callbacks (see this post)
drawnow;
figure(app.UIFigure)
  댓글 수: 10
farzad
farzad 2020년 3월 24일
Thank you Cris, but I got an error
Undefined function 'FocusUIFigure' for input arguments of type 'matlab.ui.Figure'.
Error in app120/ChooseDirectoryButtonPushed (line 27)
FocusUIFigure(app.UIFigure)
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 309)
Error while evaluating Button PrivateButtonPushedFcn.
Cris LaPierre
Cris LaPierre 2020년 3월 24일
FocusUIFigure is a custom function that is attached to the post I linked you to. You'll have to download it in order to use it.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by