フィルターのクリア

Problem with Inputdlg function

4 ビュー (過去 30 日間)
Jorge
Jorge 2011 年 2 月 11 日
Hi. I have a problem with Inputdlg function. Due to the size of my screen when the number of inputs is more than 15 I can' t see the first inputs. How I can fix it? Thanks in advance
The structure of my m file is this
clear,clc
number=15
for j=1:number
prompt(j)={'Worker Name'};
end
dlg_title = 'Employee Name';
num_lines = 1;
def=cell(1,number);
for j=1:number
def(j)={''};
end
names=inputdlg(prompt,dlg_title,num_lines,def)

採用された回答

Jos (10584)
Jos (10584) 2011 年 2 月 11 日
You can set the resize option of inputdlg to on, as described in the help, although I doubt this will help you a lot. However, given your code, why not have a single edit box, allowing for multiple lines?
% You can enter as many names as you want
% each name is followed by an enter
% the 5 only specifies the size of the edit box
names = inputdlg('Names', ' Employes', 5,{''})
if ~isempty(names)
names = cellstr(R{1}) % convert to cell array of strings
end
  1 件のコメント
Jorge
Jorge 2011 年 2 月 11 日
Thank you very much Jon

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by