필터 지우기
필터 지우기

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 CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by