How to change inputdlg height?

39 views (last 30 days)
Ashok Sakhardande
Ashok Sakhardande on 20 Jul 2016
Edited: Ashok Sakhardande on 20 Jul 2016
I'm creating a script to collect questionnaire data using inputdlg but some questionnaires are so long they do not fit within the screen.
How can I either: - Allow the user to resize the window height (vertical size) and scroll up/down
- Set the window height (vertical size) and allow the user to scroll up/down
- Any other solutions that allow a large number of questions to be presented and responded to
options.Resize only allows the user to change the width (horizontal size) of the box.
For example I'd like to be able to provide an answer to all 60 of the questions created using the code below.
Q=cell(1,60);
Q(:)={'Question'};
answer=inputdlg(cellstr(Q));
Thanks Ashok
  1 Comment
Adam
Adam on 20 Jul 2016
It is probably simplest just to create your own GUI - it is pretty simple and you can give whatever options you want then.

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 20 Jul 2016
Try this:
prompt = {'Enter matrix size:','Enter colormap name:'};
dlg_title = 'Input';
width = 200;
height = 5; % lines in the edit field.
num_lines = [height, width];
defaultans = {'20','hsv'};
answer = inputdlg(prompt,dlg_title,num_lines,defaultans);

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!