Write on next line whilst constructing questdlg

조회 수: 3 (최근 30일)
fsgeek
fsgeek 2013년 1월 16일
Hey guys,
I'm constructing a question dialog box which has quite a lot of writing in it. Is there a way of writing the rest of the text on the next line of the script file? I've tried using ellipses and it's not working.
On a side note, is it possible to format questdlg so that you can split the dialog text into separate paragraphs?
Cheers,
Louis Vallance

채택된 답변

Jan
Jan 2013년 1월 16일
편집: Jan 2013년 1월 18일
QUESTDLG wraps the text automatically at a certain width. Several paragraphs can be obtained by using a cell string, perhaps with an empty string as separator:
Str = ['asdhgaiosdzgoaszdlbas l lashb kjha sd,man bsdljhakshdg v ', ...
'öaiosuh asödh ljhansbd kjash dbkashdg'];
questdlg(Str);
questdlg({Str, '', Str})
Look at the doc textwrap command also.
[EDITED, Jan, typo fixed: quote character inserted]
  댓글 수: 2
fsgeek
fsgeek 2013년 1월 17일
Thanks for the reply.
If I use your code as an example and execute I get the following error:
??? Undefined function or variable 'ljhansbd kjash dbkashdg'.
I've never had much luck with using "..." to separate strings.
Jan
Jan 2013년 1월 18일
Yes, Louis, I forgot a quote character. Could you be able to fix this by your own?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dialog Boxes에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by