MATLAB: How to make a box for comments in Matlab GUI

edit textMATLABmatlab guiuicontrol

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?

Best Answer

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.
Related Question