Chatroom type text view

I was wondering if there is any known way, or hack, to display text using a Paragraph component to where the newest text at the end is always displayed in the view.

For example (using pseudo-code) if im adding text to a chatroom text variable:
ChatRoomText = ChatRoomText + UserName + ": " + NewText + ‘/n’

and I bind a Paragraph component to that ChatRoomText variable which will display something that looks like:

John: Hello
Mary: Hello
John: How are you?
Mary: Im great!
etc…

I need a way for the view to scroll itself to the end somehow.

Currently, if im using a scroll view to contain the text but you have to manualy scroll down to see the newest text at the bottom.

Any way to do this?

So ive tried using list items to contain each message and display them as a repeated item array in a scroll view, but still no solution - the most recent list item entries are added out of view at the bottom and must be scrolled to manually to see them.

What do you mean by pseudo code? What are you using for that?

Nevermind, i got it to work inside a default scroll view (no settings changed), and Stretch to the Viewport Height Unchecked. The last list item added gets displayed at the bottom as it should, with the older items scrolling off the top of the view.

1 Like

Hello, @JOHN_WORSHAM . I’m happy to know you’ve got it to work but I’m currently struggling with the same problem and didn’t understand how you did it. I too have “strech to viewport height” unchecked but the messages pile down instead of up and the user has to scroll down all the way to read the latest. How did you do it?

Thanks in advance for sharing!

@JOHN_WORSHAM do you mind s haring how you did this? I am struggling with the chat set up myself