挂起和恢复布局 [英] Suspend and Resume layout
本文介绍了挂起和恢复布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一些子控件.当我在For ... Each循环中更新所有控件中的文本时,我不希望每次更新循环中的每个控件时都发生这种级联事件.
我希望它在更新所有控件后发生一次.有可能吗?
谢谢.
I have some child controls. As I''m updating the text in all the controls in a For...Each loop then I don''t want this cascade of events to happen for every time I update each control in the loop.
I want it to happen once after I''ve updated ALL the controls.Is it possible?
Thanks.
推荐答案
您如此亲近!!! :)进入此循环之前的功能为
You where so close!!! :) The function before entering this loop would be the
TheForm.SuspendLayout();
并在完成循环后调用(在Next语句之后)
and when the loop is done you call (after the Next statement)
TheForm.ResumeLayout();
祝你好运!
Good luck!
这篇关于挂起和恢复布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文