I want to load a folder in appdesigner by using "button" and to load the path of the folder in the "EditField". How?

조회 수: 23 (최근 30일)
Hi,
I am trying to upload the folder using "Button" in appdesigner callback function and I want to store the folder directory in "EditField". May I know how to get this?
I am trying the code like:
[folder,app.selectedPath] = uigetdir();
if isequal(folder,0)
app.EditField_2.Value = "User Selection cancel";
else
app.EditField_2.Value = fullfile(folder);
app.EditField_2.Value = fullfile(app.selectedPath);
end

채택된 답변

Rik
Rik 2021년 7월 7일
The uigetdir function only has 1 output.
folder = uigetdir();
if isequal(folder,0)
app.EditField_2.Value = "User Selection cancel";
else
app.EditField_2.Value = folder;
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 External Language Interfaces에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by