GUI help to add space in lines
조회 수: 2 (최근 30일)
이전 댓글 표시
HelpTitle='Help';
A1 = ' MSU';
A2 = ' DEE';
A5 = 'start';
A6 = 'stop';
A7 = 'Save';
A8 = 'Images';
A9 = 'Create';
dialogue=strvcat(1,A1,A2,A3,A4,A5,A6,A7,A8,A9);
helpdlg(dialogue,HelpTitle);
I am creating Help menu In GUI, I have put a push button and written above script behind it...
In this script between A2 and A5 there will be A3 and A4, and I want to add space in this two lines, so how to add?
댓글 수: 3
Image Analyst
2012년 12월 16일
Yeah, confusing I admit. I think you're supposed not press that button first. First paste in your code and highlight it. THEN click that button. Try it that way instead.
채택된 답변
추가 답변 (1개)
Image Analyst
2012년 12월 16일
An alternate way using sprintf() and \n to insert blank lines:
HelpTitle='Help';
A1 = ' MSU';
A2 = ' DEE';
A5 = 'start';
A6 = 'stop';
A7 = 'Save';
A8 = 'Images';
A9 = 'Create';
dialogue= sprintf('%s\n%s\n\n%s\n%s\n%s\n%s\n%s',...
A1,A2,A5,A6,A7,A8,A9); % The backslash n inserts a blank line.
helpdlg(dialogue,HelpTitle);
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!