Selecting an option in the drop down menu that displays different edit fields
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
tyler seudath
il 30 Dic 2020
Risposto: Cris LaPierre
il 30 Dic 2020
Good day Everyone,
I am trying to link the dropdown menu options to particular edit fields. For instance, if I select on option 1 in the drop down menu, I want to be able to display Edit field 1 adn Edit field 2. Conversely, if I select option 2 , i want to display Edit field 3 and Edit field 4. Is there a way to go about performing this task?
Thank you,
TS
0 Commenti
Risposta accettata
Cris LaPierre
il 30 Dic 2020
Yes. I would first create all 4 edit boxes, but set their 'Visible' property to 'off'. Then, in the callback of your dropdown menu, I would have a switch statement that runs different cases based on the value property. The code for a specific case would change the visilibilty to 'off' of the edit fields you do not want to see, and would change the visibility to 'on' of those you do want to see.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Simulink Environment Customization 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!