When you want to change the enable of several UIs,
You can use this function.
#Function
%// how to call function
TargetUIs = [app.TextArea, app.EditField, app.Label];
EnablChanger('off', TargetUIs);
EnablChanger('on', TargetUIs);
%// Below is the function
function EnablChanger(Task, TargetUIs);
CountList = length(TargetUIs);
for i = 1 : CountList
if (strcmp(Task, 'on'))
TargetUIs(i).Enable = 'on';
elseif (strcmp(Task, 'off'))
TargetUIs(i).Enable = 'off';
end
end
end
'Memo > Matlab' 카테고리의 다른 글
Matlab : Prepare the Machine Learning Param Table (0) | 2022.11.12 |
---|---|
Matlab : Make & Write Data in PPT file (without PPT API) (0) | 2022.08.09 |
Matlab function : Save and load UI values in text (0) | 2022.08.08 |
Matlab function : Update the Text Area with part of a text file (0) | 2022.08.02 |
Matlab : UI drop-down (0) | 2022.08.01 |