While trying to make a simple chat app (just a passion project, no high stakes), I ran into a problem when displaying messages:
Since the amount of messages can increase above what can be displayed on the screen (the server side max is 50 messages at 2 lines each or 100 lines total), we want to use the ScrollablePane element. However when new elements are added at the bottom, they are not visible when the number of messages reaches a certain point.
I have tried implementing the desired behavior, but was unable, as the only way I thought of required query a components size and I was unsuccessful at finding any method do such.
#item it the last item of your message container
curr=self.app.layout.current_window
self.app.layout.focus(item)
self.app._redraw()
self.app.layout.focus(curr)
self.app._redraw()
While trying to make a simple chat app (just a passion project, no high stakes), I ran into a problem when displaying messages:
Since the amount of messages can increase above what can be displayed on the screen (the server side max is 50 messages at 2 lines each or 100 lines total), we want to use the ScrollablePane element. However when new elements are added at the bottom, they are not visible when the number of messages reaches a certain point.
I have tried implementing the desired behavior, but was unable, as the only way I thought of required query a components size and I was unsuccessful at finding any method do such.