如何消除滚动时 wxListCtrl 的闪烁?
我在 wxWidgets 应用程序中使用 wxListCtrl,并且似乎无法消除快速滚动大型项目列表时发生的闪烁(例如按住“向下翻页”键)。列表控件被创建为虚拟/报告列表,我现在在Win7下测试。
看来背景清晰导致了闪烁,尽管我不能简单地覆盖它,因为文本/边框需要正确显示。
我相信我需要的是一种进行双缓冲的方法,其中列表不会在视觉上更新,直到背景被清除并且项目被绘制(屏幕外)之后。有谁知道如何在 wxWidgets 中执行此操作?或者有更好的方法吗?
非常感谢...
I'm using wxListCtrl within a wxWidgets application, and can't seem to eliminate the flickering that occurs while scrolling through a large list of items quickly (e.g. holding the 'page down' key.) The list control is created as a virtual/report list, and I'm testing under Win7 at the moment.
It appears the background clear is causing the flickering, though I can't simply override it because it's required for the text/borders to appear correctly.
I believe what I need is a way to do double buffering, where the list isn't updated visually until after both the background is cleared and the items are drawn (offscreen.) Does anyone know how to do this in wxWidgets? Or is there a better way?
Many thanks...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 TListView 的 VCL 版本,我调用 pListView->DoubleBuffered = true;如果 wxWidgets 下有一个你喜欢的属性,你可以尝试一下。
Using the VCL version of TListView I call pListView->DoubleBuffered = true; If there is a property under wxWidgets that like you might try it.