Input Dialogue box text not breaking line
    3 ビュー (過去 30 日間)
  
       古いコメントを表示
    
Hello,
In the code below, I am attempting to break the lines of text in the dialogue box to two lines: line 1: What Text or Word would you like me to write? line 2: [No spaces allowed for first input]
This is what I get

Can you help me break the lines properly? Thanks
   % Ask user for input word
  Input = inputdlg(['What Text or Word would you like me to write?',...
                    '\n[No spaces allowed for first input]'],... 
               'Sample', [1 50]);
0 件のコメント
採用された回答
  Star Strider
      
      
 2017 年 11 月 16 日
        The sprintf function does this the way you want:
Input = inputdlg(sprintf('%s\n%s', 'What Text or Word would you like me to write?',...
    '[No spaces allowed for first input]'),...
    'Sample', [1 50]);
(Using inputdlg is definitely the way to go!)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
				Help Center および File Exchange で Labels and Annotations についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

