How to set visibility of Button in SIMULINK Mask ?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sultan
am 22 Aug. 2016
Kommentiert: Tobias Bertsch
am 25 Aug. 2023
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 Kommentare
Akzeptierte Antwort
John D
am 20 Okt. 2016
There is a solution:
p = Simulink.Mask.get(gcb); param = p.getDialogControl(<Name of your control in the mask>); param.Visible = 'off';
1 Kommentar
Tobias Bertsch
am 25 Aug. 2023
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>);
Weitere Antworten (2)
Fangjun Jiang
am 22 Aug. 2016
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 Kommentare
John D
am 19 Okt. 2016
As the questioner said, "that wont work since there is no serial number" Does not work for me either.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Author Block Masks finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!