Display array in GUI after pressing button

2 次查看(过去 30 天)
I have a GUI set up so that when I click the button, it displays an array in the workspace. How can I use a text box in my GUI to display this array when I click the button? The array I'm using is composed of several strings if that would change anything. Thanks!

采纳的回答

Orion
Orion 2014-11-10
编辑:Orion 2014-11-10
Hi,
Don't use a textbox.
use uitable, this way you can put any kind of data : numeric, string, logical,.. see the documentation
  3 个评论
Orion
Orion 2014-11-11
编辑:Orion 2014-11-11
With a uitable, you can store a very long list easily. this graphic object come with a scrollbar, which will allow you to save space in your gui.
if you want to create it when you click on the pushbutton.
1) in guide, place the uitable, and set the visible property_ to off.
2) in your code, especially in the pushbutton callback, do something like :
set(handles.uitable1,'visible','on','Data',MyArrayOfString)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by