Effacer les filtres
Effacer les filtres

Problem with Inputdlg function

4 vues (au cours des 30 derniers jours)
Jorge
Jorge le 11 Fév 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)

Réponse acceptée

Jos (10584)
Jos (10584) le 11 Fév 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 commentaire
Jorge
Jorge le 11 Fév 2011
Thank you very much Jon

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by