필터 지우기
필터 지우기

Strange behaviour with uigetfile in APPDesigner (not observed in GUIDE)

조회 수: 1 (최근 30일)
Jason
Jason 2020년 10월 8일
답변: Jorg Woehl 2024년 5월 14일
Hello.
I am updating my code from GUIDE and have found a strange effect using uigetfile. It works fine in GUIDE.
what happens is when I run this, whilst it works, my app switches and makes the matlab command window come to the front. Althought I can just reselect my app, its not ideal. Thanks for any pointers.
Jason
This is my code.
[file,path,idx]=uigetfile({'*.tif';'*.tiff';'*.RAW';},'Load Image',app.startfolder);
where startfolder is defined as a public property
properties (Access = public)
startfolder %starting generic save / load folder
and initiated in the StartupFCN:
function startupFcn(app)
app.startfolder='C:\' ;%starting generic save / load folder

채택된 답변

Mario Malic
Mario Malic 2020년 10월 8일
This is a known issue with App Designer, here's the workaround, see the accepted answer.

추가 답변 (1개)

Jorg Woehl
Jorg Woehl 2024년 5월 14일
I have just published a simple workaround for these focus issues, which -- as The MathWorks acknowledges -- still have "currently no official workaround". Check out my File Exchange contribution https://www.mathworks.com/matlabcentral/fileexchange/165961-fixfocus, which was in part inspired by the thread mentioned in Mario Malic's answer.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by