Display array in GUI after pressing button

조회 수: 3 (최근 30일)
Joseph
Joseph 2014년 11월 10일
댓글: Joseph 2014년 11월 12일
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)
Joseph
Joseph 2014년 11월 12일
Thank you! That helps so much!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile 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!

Translated by