How to make a box for comments in Matlab GUI?

1 view (last 30 days)
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?

Accepted Answer

Adam
Adam on 3 Aug 2018
Edited: Adam on 3 Aug 2018
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.

More Answers (1)

Randall Luna
Randall Luna on 15 Apr 2019
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.

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!