Need help with a chatbot #2794
Replies: 1 comment
-
I think you're getting stuck on having multiple scroll bars in play. Based on your example code, you've put the MultilineTextInput inside a scroll container. This shouldn't be necessary - a MultilineTextInput will have a scroll bar if there's too much content to fit. In your layout, you're putting that scrollable content inside a scroll view - so it's not clear which scroll bar you're moving when you add content. MultilineTextInput also has So - you should be able to add the MultilineTextInput directly to the main box, and call As an aside, you may also want to look at the |
Beta Was this translation helpful? Give feedback.
-
My project is a chatbot.
my chatbot works fine.
user can input text and get a response.
however, there's one thing I can't figure out. I want the scroll bar to go down automatically after hitting the send button. i want the text output to be visible without having to scroll. normally, when hitting send, the output is not visible. user needs to scroll down to see it.
I have tried the following code under the method that handles the send button.
self.scroll_to_bottom()
def scroll_to_bottom(self):
# Scroll to the bottom by setting the vertical scroll position to 1
self.scroll_container.vertical_position = 1
this is my code for the scroll container:
Create the ScrollContainer for the chat output
If you have any questions about my code or need more information, I will be happy to provide it. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions