I am using wxPython and want my HtmlWindow
to scroll down automatically after adding new content. I am using it as a log window inside my app. Unfortunately, I am struggling to get it working. Here is my sample with lacks the functionality:
import wx
import wx.html
class GUI(wx.Frame):
def __init__(self, parent):
super().__init__(parent)
self.html = wx.html.HtmlWindow(self, -1, pos=(0, 0), size=(50, 50))
msg = '<pre>FOO</pre>'
for i in range(10):
self.html.AppendToPage(msg)
if __name__ == '__main__':
app = wx.App()
frame = GUI(parent=None)
frame.Show()
app.MainLoop()
I want the scrollbar showing the stack of "Foos" to be at the bottom instead of staying on top so that the latest logging content is shown to the user.