How can I change what parameters are visible in a masked block dialogue box?
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I'm looking to create a masked system where the user is presented with an option of different parameter types to enter in the dialogue box but the selection of this parameter options should change what is presented to the user within the dialogue box.
I've tried using the example in the help file under "Creating Dynamic Mask Dialogue Boxes" but since the code being used is not explained well it will not work in my mask.
Any help or advice greatly appreciated!
0 Commenti
Risposta accettata
Babak
il 10 Set 2012
When you are creating the mask, right click on the block and choose "edit MASK" then in the "Parameters" pane of the "Mask Editor" you will see your parameters defined. When you click on each of the parameters, you can deinf e callback function for each of the parameters by writing an m-file's name in Dialog callback. Or you can just simply write pieces of code there in Dialog callback. This code runs as a callback for that parameter.
In that code you can change the visibility of the mask parameters(as well as enabling or disabling them) with commands like this:
set_param(gcb,'MaskVisibilities',{'on';'off'})
where I make the first parameter visible but the second one invisible, and
set_param(gcb,'MaskEnables',{'on';'off'})
where I make the first parameter enabled but the second one disabled.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Author Block Masks in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!