gpt4 book ai didi

delphi - 刷新、更新和重画之间有什么区别?

转载 作者:行者123 更新时间:2023-12-03 14:32:43 29 4
gpt4 key购买 nike

我不知道这三种方法中哪一种最适合我。他们都为我工作。有谁知道刷新、更新和重画之间的区别吗?

最佳答案

根据在线文档:

Refresh - 重新绘制屏幕上的控件。

Call Refresh method to repaint thecontrol immediately. Refresh calls theRepaint method. Use the Refresh andRepaint methods interchangeably.

Repaint - 强制控件在屏幕上重新绘制其图像。

Call Repaint to force the control torepaint its image immediately. If theControlStyle property includescsOpaque, the control paints itselfdirectly. Otherwise, the Repaintmethod calls the Invalidate method andthen the Update method so that anyvisible portions of controls beneaththe control will be repainted as well.

Update - 立即处理任何待处理的绘制消息。

Call Update to force the control to berepainted before any more, possiblytime-consuming, processing takesplace. Use Update to provide immediatefeedback to the user that cannot waitfor the Windows paint message toarrive.

Update does not invalidate thecontrol, but simply forces a repaintof any regions that have already beeninvalidated. Call Repaint instead toinvalidate the control as well.

关于delphi - 刷新、更新和重画之间有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1251009/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com