#How to define a textbox that auto-scrolls to the bottom?

1 messages · Page 1 of 1 (latest)

lapis jolt
#

Hi Dioxusers, I am trying to build a simple desktop app where I have a read-only text box that should automatically scrolls to the bottom of the text content, whenever the content gets updated.
I did some research but could not find how to achieve this.

Could you please shed some light on the how-to?

Cheers!

stable pebble
#

Do you want a textbox you can only read and not input characters into?

lapis jolt
#

Thank you for the response. Yes I want a textbox that is read only by the user, but the application itself will write/update to the textbox.
I will give onmounted a try and might have further questions.

Many thanks again,

lapis jolt
stable pebble
#

If you can find code to do that with javascript, you can do it with eval in dioxus

#

Or you could create your textbox as a div with a span {} you can scroll to at the bottom