Hi,
I assume that on selecting the combinations checkboxes the text should vary, on clicking a button.
For accessing the checkbox values, you may code something like below
function ButtonPushed(app, event)
fieldNames = fieldnames(app);
allCheckBoxNamesList = fieldNames(contains(fieldNames,'CheckBox','IgnoreCase',true));
for i = 1:numel(allCheckBoxNamesList)
if app.(allCheckBoxNamesList{i}).Value == true
app.TextArea.Value = [string(app.TextArea.Value);app.(allCheckBoxNamesList{i}).Text;]
end
end
You may get something like below
Hope this helps.
1 Comment
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/580467-multiple-check-boxes-to-check-to-provide-an-output#comment_975288
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/580467-multiple-check-boxes-to-check-to-provide-an-output#comment_975288
Sign in to comment.