AppDesigner : How to Change the value of a dd according to the user input to another dd?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
Adam
2018-3-9
Are you sure you didn't get it wrong and use the == that you have included in your code above instead of = ?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!