如何减少 Delphi 中的 PageControl 闪烁?
在 Delphi 2009 中,我发现 PageControl 的闪烁(在调整表单大小期间发生)可以通过将其 DoubleBuffered
属性设置为 true 来减少。
但是,如果我将控件添加到 PageControl 选项卡,无论其 DoubleBuffered 属性设置如何,它们都会闪烁。我还尝试过启用和不启用运行时主题。
In Delphi 2009 I found that the flicker of a PageControl - which occurs during resizing of the form - can be reduced by setting its DoubleBuffered
property to true.
However if I add controls to the PageControl tabsheets, they will flicker regardless of their DoubleBuffered property setting. I have also tried with and without runtime themes enabled.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将 PageControl 上的组件的
ParentBackground
设置为False
有很大帮助。然而,这会导致这些面板组件的颜色不同,它们现在都有较暗的背景。也许这个问题可以很容易地解决(不会失去主题支持)。我还安装了 VCL Fix Pack,它修复了 QC 56252(TPageControl 在活动主题下闪烁很多)。
Setting
ParentBackground
toFalse
for components on the PageControl helped a lot. However this results in a different color of these panel components, they all have a darker background now. Maybe this can be fixed easily (without losing Theme support).I also installed VCL Fix Pack which has a fix for QC 56252 (TPageControl flickers a lot with active theming).
这远非完美,但您可能想使用它:
这是迄今为止我发现的最好的,并且会减少页面控件的 Windows 更新。虽然它可能不太漂亮,但这是一个意见问题......
This is far from perfect, but you might want to use this:
It's the best I found this far, and will reduce the windows update of your page control. It might be less pretty, though, but that's a matter of opinions...