Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
How to obtain text in GUI edit box exactly as it appears on the screen
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/147277/image.png)
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.
0 Commenti
Risposte (0)
Questa domanda è chiusa.
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!