How do I put multiple lines of text in the title/question section? (probably a uicontrol question)

I'm trying to make the user be able to add a second line in the question section, qStr, in a multiple choice dialogue box.
so, an example would be:
Which one?
hello?
in the question section.
I attached a test code and the function itself above.
I got the function from the public function forum, but it looks like its been idle for a long time:
It works for the questdlg function like this:
choice = questdlg([{'What would you like to do with this site?';...
'Net Output is both demand and generation'; ' ' }], ...
'Site Analysis', ...
'Analyze Demand','Analyze Net Output','Nevermind (End Program)','Nevermind (End Program)');
but not for the bttnChoiseDialog function

回答 (1 件)

Dear leon,
try using this:
dlgTitle = sprintf('Someone\n\t hello?');
% -> \n goes to a new line, and
% -> \t adds a tabulation (as I see the "hello?" word has an indentation)
Best, Sandro

1 件のコメント

leon
leon 2018 年 5 月 22 日
it does not seem to work on the test code,but my main priority is the 'qStr', question text.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeScope Variables and Generate Names についてさらに検索

製品

リリース

R2018a

質問済み:

2018 年 5 月 22 日

編集済み:

2018 年 5 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by