Borrar filtros
Borrar filtros

Problem with Inputdlg function

4 visualizaciones (últimos 30 días)
Jorge
Jorge el 11 de Feb. de 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)

Respuesta aceptada

Jos (10584)
Jos (10584) el 11 de Feb. de 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
  1 comentario
Jorge
Jorge el 11 de Feb. de 2011
Thank you very much Jon

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by