App designer Choose active and inactive variables from large list
2 次查看(过去 30 天)
显示 更早的评论
I am designing an app in app designer and I was looking to use something like the picture below to choose from a wide list of variables to activate or deactivate them in code. Is there any alternative or better/more usable way to do this? The list of variables will be up to 200 choices long. What is the best way to organize and show this for the people who will use the app? I am hoping to do something better than toggle buttons too because there may not be enough space in the app. Thanks in advance!
![tableexample.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/233772/tableexample.png)
0 个评论
回答(1 个)
Shubham Kashyap
2020-6-11
You can use list box function that creates list box component. You can refer to the following link for more information :
You would need to just tie those commands to the value selected in the list box.
app.ListBox.Value tells you the number of the item selected in the list box.
app.ListBox.Items tells you the actual text displayed in the list box.
If you know about callbacks, you can add a callback to the list box so that anytime the selection changes, the callback function is executed.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!