How to display Multiple Statements in a GUI Edit Box
조회 수: 2 (최근 30일)
이전 댓글 표시
I am a new user of Matlab; I am facing this problem that whenever I write into an edit box using 'set' command, result of last 'set' command is only displayed in the edit box. For example set(handles.edit1,'String','This is first statement'); set(handles.edit1,'String','This is second statement'); then only " This is second statement" string displayed in the edit box; where as I want both in the edit box. Please Guide me in this regard
댓글 수: 0
채택된 답변
SRI
2014년 6월 13일
Hi Khurram, Please try this code which will help you in resulting both the statement in edit tool.
A = 'This is the first Set';
B = 'This is the second Set';
set(handles.edit1,'string',[A, B])
추가 답변 (1개)
Dishant Arora
2014년 6월 13일
String = {'This is first statement'};
set(handles.edit1 , 'String' , String);
String = {String{:},'This is the 2nd statement'};
set(handles.edit , 'Max' , 2) % To accomodate multi line text
set(handles.edit1 , 'String' , String);
댓글 수: 1
Shri.s
2023년 3월 30일
But this shows vertically in edit box ,i want to show horizantly in edit box ,is there any solution please.
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!