MATLAB: How to set visibility of Button in SIMULINK Mask

MATLABsimulink

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.

Best Answer

There is a solution:
p = Simulink.Mask.get(gcb); param = p.getDialogControl(<Name of your control in the mask>); param.Visible = 'off';