如何将内容附加到wxHtmlWindow?
我知道SetPage()设置wxHtmlWindow的内容。在我的应用程序中,我将以类似于日志文件的方式频繁附加更多内容,因此我想避免重复调用 SetPage() 以避免不必要的 CPU 周期浪费在一遍又一遍地解析相同的内容上,并保持显示闪烁过多。
我考虑过使用 wxHtmlListBox 但觉得我不太喜欢这个解决方案,因为用户无法选择/复制一小部分文本。
将新内容附加到“body”标签的示例代码将不胜感激。如果有人有更好的想法,我也愿意接受其他解决方案。
I know SetPage() sets the content of wxHtmlWindow. In my application, I will be appending more content frequently in a fashion similar to a log file, so I'd like to avoid calling SetPage() repeatedly to avoid unnecessary CPU cycles being wasted on parsing the same content over and over and keep the display from flickering too much.
I thought about using wxHtmlListBox but decided I didn't really like that solution because users won't be able to select/copy small portions of text.
Example code of appending new content to the 'body' tag would be appreciated. I'm also open to other solutions if someone has a better idea.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您反对使用 AppendToPage 吗? http://www.wxpython.org/docs/api /wx.html.HtmlWindow-class.html#AppendToPage
Are you against using AppendToPage? http://www.wxpython.org/docs/api/wx.html.HtmlWindow-class.html#AppendToPage