减少.NET FlowLayoutPanel的闪烁
我每隔几秒就会清除多个 LinkLabel 并将其添加到 FlowLayoutPanel 中。它工作正常,但闪烁非常明显。有什么办法可以减少吗?我尝试设置 Form.DoubleBuffering,但没有帮助。
I'm clearing and adding multiple LinkLabel's to FlowLayoutPanel, every couple of seconds. It works fine, but flicker is quite noticeable. Is there any way to reduce it? I tried to set Form.DoubleBuffering, it didn't help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通过创建派生自 FlowLayoutPanel 的自定义控件并设置其样式进行管理,如下所示:
Managed by creating a custom control derived from FlowLayoutPanel and setting its styles as shown below:
在向面板添加控件之前尝试调用面板的 SuspendLayout(),然后在面板上调用 ResumeLayout()。你可能会失去一点闪烁。
Try calling SuspendLayout() for the panel before adding controls to it and then call ResumeLayout() on the Panel. You may lose that flicker a bit.