How to make a box for comments in Matlab GUI?

조회 수: 3 (최근 30일)
Cristian Galán
Cristian Galán 2018년 8월 3일
답변: Randall Luna 2019년 4월 15일
First of all, English is not my mother tongue; please excuse any errors on my part.
I would like to put a place for comments in my GUI where the user can write and, when the box ends at the right, the program automatically passes to the next line for writing, as any Text Editor that is used nowadays(like this one, for example). However, I currently have a rectangle where the whole text is written in a line, "Intro" is not allowed and I can't see the way on how to solve this issue. The code that I typed is:
uicontrol ('Units', 'pixels','Style','edit','FontName', 'arial','FontWeight', 'bold','FontSize', 12,);
I'm not using GUIDE but the solution may be similar. Does anyone know how to deal with this issue?

채택된 답변

Adam
Adam 2018년 8월 3일
편집: Adam 2018년 8월 3일
uicontrol ( ...
'Units', 'pixels',...
'Position', [0 0 200 200],...
'Style','edit',...
'FontName', 'arial',...
'FontWeight', 'bold',...
'FontSize', 12,...
'HorizontalAlignment', 'left',...
'max', 2 );
should give something more like what you want. Obviously the sizing is just arbitrary, but yours is so small it doesn't have multiple lines to show anyway.

추가 답변 (1개)

Randall Luna
Randall Luna 2019년 4월 15일
Come and learn how can you make comment box. This is more easily but in that diy paint project condition when you know coding about it. Some of you can eaisly understand it but some of them are not understand it because they not know how can they manage this whole.

카테고리

Help CenterFile Exchange에서 Text Data Preparation에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by