Problem with Inputdlg function

1 view (last 30 days)
Jorge
Jorge on 11 Feb 2011
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)

Accepted Answer

Jos (10584)
Jos (10584) on 11 Feb 2011
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

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!