How to set visibility of Button in SIMULINK Mask ?
조회 수: 37 (최근 30일)
이전 댓글 표시
I have created a "button" in a Block mask. I want to change its visibility. I have have tried set_param command with 'MaskVisibilities' but that wont work since there is no serial number against "Button". I have also tried get_param() using 'DialogParameters' but still didnt get the properties of button.
댓글 수: 0
채택된 답변
John D
2016년 10월 20일
There is a solution:
p = Simulink.Mask.get(gcb); param = p.getDialogControl(<Name of your control in the mask>); param.Visible = 'off';
댓글 수: 1
Tobias Bertsch
2023년 8월 25일
In R2022b
param = p.getDialogControl(<Name of your control in the mask>);
did not work for me. Instead I had to use
param = p.getParameter(<Name of your control in the mask>);
추가 답변 (2개)
Fangjun Jiang
2016년 8월 22일
Select your masked block, type "get(gcbh)" in Command window to see a full list of parameters and their values.
get/set either of this should work.
get(gcbh,'MaskVisibilities')
get(gcbh,'MaskVisibilityString')
댓글 수: 0
John D
2016년 10월 19일
As the questioner said, "that wont work since there is no serial number" Does not work for me either.
댓글 수: 0
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!