加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

delphi – 刷新,更新和重绘有什么区别?

发布时间:2020-12-15 05:24:04 所属栏目:大数据 来源:网络整理
导读:我不知道这三种方法中哪一种最适合我。他们都为我工作。有谁知道刷新,更新和重绘之间的区别? 解决方法 根据在线文档。 Refresh – 在屏幕上重绘控制。 Call Refresh method to repaint the control immediately. Refresh calls the Repaint method. Use th
我不知道这三种方法中哪一种最适合我。他们都为我工作。有谁知道刷新,更新和重绘之间的区别?

解决方法

根据在线文档。

Refresh – 在屏幕上重绘控制。

Call Refresh method to repaint the
control immediately. Refresh calls the
Repaint method. Use the Refresh and
Repaint methods interchangeably.

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

Call Repaint to force the control to
repaint its image immediately. If the
ControlStyle property includes
csOpaque,the control paints itself
directly. Otherwise,the Repaint
method calls the Invalidate method and
then the Update method so that any
visible portions of controls beneath
the control will be repainted as well.

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

Call Update to force the control to be
repainted before any more,possibly
time-consuming,processing takes
place. Use Update to provide immediate
feedback to the user that cannot wait
for the Windows paint message to
arrive.

Update does not invalidate the control,but simply forces a repaint of any regions that have already been invalidated. Call Repaint instead to invalidate the control as well.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读