Get listbox into textbox
显示 更早的评论
Hi, I want to get values from listbox to insert textbox by adding sentence.:
I have cities in listbox(milano, atina, istanbul, amsterdam)
When I choose amsterdam, sholud be shown in the textbox "Selected city is Amsterdam"
Next I choose milano, sholud be shown in the textbox "Selected cities is Amsterdam, Milano"
Next I choose istanbul, sholud be shown in the textbox "Selected cities is Amsterdam, Milano, İstanbul"
I try but I only know "string" and "value" command so I can't solve how to add directly string text and adding to each other. thanks for interest.
city=get(handles.listbox1,'string');
set(handles.edit1,'string',city);
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 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!