How to make a Text Area auto-scroll to bottom (created in app designer)
67 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Frank van Diggelen
le 3 Août 2017
Modifié(e) : Frank van Diggelen
le 17 Juin 2022
I created a Text Area in app designer. It is populated with status messages as the app runs. After a while the area fills with lines of text, and the vertical scroll bar appears, but new messages are written in the invisible part of the area. The user has to scroll down "by hand". How can I make the Text Area autoscroll, so that each new message is visible?
1 commentaire
Eric Sargent
le 9 Déc 2020
As of R2020b uitextarea now supports scroll.
In this case you could use:
scroll(textArea, 'bottom')
Réponse acceptée
Eric Sargent
le 9 Déc 2020
As of R2020b uitextarea now supports scroll.
In this case you could use:
scroll(textArea, 'bottom')
1 commentaire
Plus de réponses (1)
Chris Portal
le 5 Août 2017
If it's possible to use a listbox instead of a text area, you would be able to use the scroll function to programmatically scroll specific items into view:
https://www.mathworks.com/help/matlab/ref/scroll.html
1 commentaire
Marko Antila
le 14 Fév 2019
Modifié(e) : Marko Antila
le 14 Fév 2019
Scroll function does not work properly with App Designer List Box, unfortunately:
- in startFcn it hides the List Box (permanently)
- in callbacks it does exactly nothing
Voir également
Catégories
En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!