anyway to call checkbox in appdesigner programmatically?
조회 수: 18 (최근 30일)
이전 댓글 표시
Hi:
is there anyway to call checkbox in appdesigner programmatically?
Thanks!
Yu
댓글 수: 2
Lewis Maina
2020년 3월 27일
yes , below is a section of my code which unticks ShowMultiplicationDivisionOptionsCheckBox.Value programmatically.
hope this helps you
function ShowAdvancedOptionsCheckBoxValueChanged(app, event)
value = app.ShowAdvancedOptionsCheckBox.Value;
switch value
case 0
case 1
app.ShowMultiplicationDivisionOptionsCheckBox.Value = false;
end
채택된 답변
Ajay Pattassery
2019년 9월 17일
I assume that you have already created a checkBox in app-designer, and you want to check or uncheck the checkBox programmatically.
You could set the value of CheckBox.Value to one for checking the box and toggling to zero to uncheck the box.
app.CheckBox.Value = 1;
(In the above example, CheckBox handle is stored in the structure app)
댓글 수: 2
Adam
2019년 9월 17일
Have your checkbox callback call a new function, passing in the checkbox value and have your other code call that same function.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!