AppDesigner : How to Change the value of a dd according to the user input to another dd?
1 view (last 30 days)
Show older comments
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 Comments
Adam
on 9 Mar 2018
Are you sure you didn't get it wrong and use the == that you have included in your code above instead of = ?
Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!