App UIFigure Visibility Bug

조회 수: 15 (최근 30일)
Mehdi Ansarey
Mehdi Ansarey 2023년 10월 26일
댓글: Mehdi Ansarey 2025년 2월 13일
I have Multi-Windows Application written with GUIDE. Currently I Tried to Migrate to App Designer.
My Problem: I Design An App, That Its Visibility Turned Off In App Startup Callback.
In Some Place, I Change The Position of That Windows (In Other Program Module), But Before User Decide to Click A Menu to show That App.
Its Very Odd That, The Windows Appears As Soon As Position Changed. I Tried to Turn It Visiblity Back to Off Again After Position Change Line. But It Didnt Work. Also Functions Like drawnow not useful (At First I Thought It is An Incomplete rendering problem).
This Is Secondary Windows That Should Be Invisible (app2):
function startupFcn(app)
app.UIFigure.Visible= "off"
end
In Master App, I Define ap2 Public Variable:
function startupFcn(app)
app.ap2= app2
end
And This Is Position Change In Some Callback That Tend To Show app2:
function ChangePositionButtonPushed(app, event)
app.ap2.UIFigure.Position= [100, 100, 1000, 700];
app.ap2.UIFigure.Visible
end
As you see, The 2nd Line Echo "off" Value for ap2.UIFigure, While It is shown.

채택된 답변

Sreeram
Sreeram 2024년 8월 9일
Hi Mehdi,
I understand that app2 becomes visible when its position is altered from the master app, even though its “Visible” property is set to “off”. I was able to reproduce the issue in MATLAB R2023b.
I have verified that this issue is not present in MATLAB R2024a. If you wish, you may upgrade to the latest MATLAB version.
You can work around the issue in MATLAB R2023b by toggling visibility to “on” and then back to “off” right after updating its position:
app.ap2.UIFigure.Visible = "on";
app.ap2.UIFigure.Visible = "off";
However, the UI figure might still be briefly displayed on the screen before getting hidden.
Hope this helps.
  댓글 수: 1
Mehdi Ansarey
Mehdi Ansarey 2025년 2월 13일
Thnks for your time. I finally Upgarade to 2024.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by