AppDesigner : How to Change the value of a dd according to the user input to another dd?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to build a GUI, one of the functionalities needed is when a user change a value in one dropdown list, I want another dropdown list to change to a certain value at the same time: if user chooses Option 2 from dd 1 then dd 2 should show Option 3. Please note both dd have same Items (dd1 has option 1. option2, option 3 and dd 2 has same items), this function should not tweak or change any of the dd items. Any ideas on how to do so? What to replace the "???" with in the following: (I know switch/case might work instead of the if-else)
function Changedd2whenddchanges(app)
value = app.DropDown.Value
if value == ('Option 2')
app.DropDown2.???== ('Option 3')
end
end
Thank you :)
5 comentarios
Adam
el 9 de Mzo. de 2018
Are you sure you didn't get it wrong and use the == that you have included in your code above instead of = ?
Respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!