Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
ScottE
ScottE le 23 Fév 2015
Clôturé : MATLAB Answer Bot le 20 Août 2021
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.

Réponses (0)

Cette question est clôturée.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by