Pushbutton sends app designer panel to the back.

I have an app with two buttons that use uigetfile to open a file, then the third processes them. When I push either of the first two buttons, it pushes the panel to the back. It looks like it has crashed. I have to click on tabs to get the panel back to the front to proceed. I have to process quite a few files. It seems there should be an easy solution, but it eludes me.
properties (Access = private)
RNETPath
RNETTable
KTMTable
end
% Callbacks that handle component events
methods (Access = private)
% Button pushed function: ReadRNETButton
function ReadRNETButtonPushed(app, event)
[RNETFilename, app.RNETPath]=uigetfile("*.csv");
% app.StatusEditField.Value='Read and Process Test Iads';
% Combine filename and path strings
RNETFileandPath=append(app.RNETPath,RNETFilename);
app.RNETTable = readtable(RNETFileandPath);
%
end
% Button pushed function: ReadKTMButton
function ReadKTMButtonPushed(app, event)
[KTMFilename, KTMPath]=uigetfile("*.csv");
%
% Combine filename and path strings
%
KTMFileandPath=append(KTMPath,KTMFilename);
app.KTMTable = readtable(KTMFileandPath);
end

댓글 수: 2

Dinesh
Dinesh 2024년 5월 14일
The issue seems to be with how the UI is configured and not with these "ButtonPushed" callbacks. Can you share the app designer file so that I can look into this?
This is the export file from app designer.

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

답변 (1개)

Adam Danz
Adam Danz 2024년 5월 14일
편집: Adam Danz 2025년 7월 11일

0 개 추천

Thanks for describing the problem.
This is a known issue (previous reports: 1, 2, and others).
This has been fixed in R2025a. Focus now returns to the app that called uigetfile after the dialog is closed. The fix is also available in the R2024a and R2024b beta releases only (not the R2024a and R2024b general releases).

카테고리

도움말 센터File Exchange에서 App Building에 대해 자세히 알아보기

제품

릴리스

R2022b

질문:

2024년 5월 14일

편집:

2025년 7월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by