GUI Creation

조회 수: 1 (최근 30일)
Zach
Zach 2011년 5월 13일
Hey I'm creating a GUI for a new engineering course. The GUI is for a project that gets agents to go around in a circle. Ultimately I want to have a text box so that the students can write their code in the text box, but it seems like the text box only allows a single line of writing. Anyway that I would be able to have a space for them to insert their code in?
Thanks in advance!
  댓글 수: 1
Sean de Wolski
Sean de Wolski 2011년 5월 13일
I think you're winning this week's effective question asking contest.

댓글을 달려면 로그인하십시오.

채택된 답변

Andy
Andy 2011년 5월 13일
Editable text – The Value property does not apply. If Max - Min > 1, then editable text boxes accept multiline input.
  댓글 수: 1
Paulo Silva
Paulo Silva 2011년 5월 13일
+1 vote

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Arturo Moncada-Torres
Arturo Moncada-Torres 2011년 5월 13일
You can use an "Input Dialog Box" with the function inputdlg.
For example, suppose you want a dialog box with two questions and three lines for each answer:
noLines = 3;
answers = inputdlg({'Question 1','Question 2'},...
'Title of the Dialog Box', noLines,...
{'Default Answer 1', 'Default Answer 2'});
Remember that answers is a cell array where each element corresponds to each answer (answer{1} has the answer of Question 1 and so on).
Hope this helps ;-)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by