Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

How to obtain text in GUI edit box exactly as it appears on the screen

1 view (last 30 days)
I am using a multi-line edit box in my GUI. The user inputs text which may wrap onto multiple lines. When I get the text from the edit box handle, the text is stored in a multi-line string. Only the return button will produce text on a separate line in the string. Here is an example:
STR = get(handles.InputText,'String')
STR =
abcde fghijk lmnopqrs tuvwxyz. ABCDEFG HIJKL MNOP QRSTU VWXYZ.
How do I get a sting that corresponds exactly to the text in the edit box? Ideally, the string would read:
STR(1,:) = abcde fghijk lmnopqrs
STR(2,:) = tuvwxyz. ABCDEFG HIJKL MNOP
STR(3,:) = QRSTU VWXYZ.

Answers (0)

This question is closed.

Products

Community Treasure Hunt

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

Start Hunting!