How can I display the information from inputdlg into a text-box?

3 views (last 30 days)
Hello! I have this code:
x = inputdlg({'Name','Age','Height'},
'Patient Data', [1 50; 1 12; 1 7]);
And, while i'm putting the information, I want it to be shown in a text-box that I have, so that that it can be visible.
How can I do it??
  3 Comments
Margarida Moura
Margarida Moura on 10 Oct 2018
Edited: Margarida Moura on 10 Oct 2018
Hello! First, I want to thank you for your answer. But It's not what I really want. I want the information to be fixed or placed in a text box and not in message box. In the image attached, where it says "Patient Data" .

Sign in to comment.

Accepted Answer

Adam Danz
Adam Danz on 10 Oct 2018
Assuming the "Patient data" box in your png file already exists in a GUI, you just need to assign the values from x output to the string property of each component. For example, let's say the handle to the 'Name' field is H.
x = inputdlg(...);
H.String = x{1};

More Answers (0)

Categories

Find more on Migrate GUIDE Apps 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!