How to display multiple string outputs in a static text box in GUI

Hi, I have a program which outputs strings. However I would like to get all those seperate string output
in a single static text box in GUI. Any suggestions regarding how it can be achieved?
Thanks in advace.

답변 (1개)

Walter Roberson
Walter Roberson 2019년 5월 21일

0 개 추천

Set the 'Max' property of the uicontrol style 'text' to more than 1. The text box will then be able to display a cell array of character vectors.
However, there will be no scroll bar for these characters. In practice it is usually more useful to use a uicontrol style 'edit' with Max greater than 1 and 'enable' set to 'disable' . Such boxes can display multiple rows, and have scroll bars, but cannot be edited.

댓글 수: 2

Thanks for the reply Walter.
It is working however, I am not able to get multiple outputs on the screen as it is only displaying one of the output displayed. The new output string removes the previous
string in the output text box.
handles.YourEditBoxTagGoesHere.String{end+1} = new_content;

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

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

제품

릴리스

R2016a

태그

질문:

2019년 5월 21일

댓글:

2019년 5월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by