How to make a box for comments in Matlab GUI?

2 次查看(过去 30 天)
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